Plots Coefficients from Fitted Models

Plots the coefficients from model objects. This very quickly shows the user the point estimates and confidence intervals for fitted models.


Coefplot is a package for plotting the coefficients and standard errors from a variety of models. Currently lm, glm, glmnet, maxLik, rxLinMod, rxGLM and rxLogit are supported.

The package is designed for S3 dispatch from the functions coefplot and getModelInfo to make for easy additions of new models.

If interested in helping please contact the package author.

News

Patched to accomodate changes to ggplot2.

Can run coefplot on a data.frame that is properly setup like on resulting from coefplot(..., plot=FALSE).

Support for glmnet models. Added tests.

In mulitplot there is now an option to reverse the order of the legend so it matches the ordering in the plot.

Major update. The codebase has been refactored to run faster and be easily updated for improvements and adding new models. New arguments (predictors and coefficients) for specifying coefficients to be plotted both by indicating the specific coefficients (including specific factor levels) or by specifying the predictors that created coefficients. This is particularly important for factor variables and interactions. New argument (newNames) for giving new names to coefficients. Mulitplot can be used to plot Andy Gelman's secret weapon by setting secret.weapon to TRUE and selecting just one coefficient in coefficients. For a vertical secret weapon set by to "Model" and horizontal to FALSE. Faceting a single model no longer works.

Refactoring of code to make new models easier to add. For now this means certain functionality will be lost, such as the shortening of coefficient names, plot a factor variable numerically.

Minor changes to plotting to reflect change in gpplot2_0.9.2.

Thanks to Felipe Carrillo I have fixed a bug in multiplot. Previously, if multiple models with the same formula but different data.frames were inputed then they would all have the same name (even if specified with the "names" argument) and only one model would be plotted. This now works as expected, plotting all the models regardless of identical formulas.

Made change to reshape2::melt so that variable.name and value.name behave properly with new ggplot2

Fixed glitch that didn't plot inner CI for single plots or multipane multiplots

Added functionality for rxLogit

multiplot can plot in a single pane or in facets Changed sort argument to use match.arg

Adjusting the S3 dispatch for coefplot.rxLinMod

Added multiplot to plot numerous models at once Moved a lot of code in coefplot.lm to their own functions

First build Methods for plotting coefficients from lm, glm and rxLinMod

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("coefplot")

1.2.4 by Jared P. Lander, 2 years ago


Browse source code at https://github.com/cran/coefplot


Authors: Jared P. Lander


Documentation:   PDF Manual  


BSD_3_clause + file LICENSE license


Imports plyr, reshape2, useful, stats

Depends on ggplot2

Suggests testthat

Enhances glmnet, maxLik


Imported by pdR.


See at CRAN