Graphical Model Stability and Variable Selection Procedures

Model stability and variable inclusion plots [Mueller and Welsh (2010, ); Murray, Heritier and Mueller (2013, )] as well as the adaptive fence [Jiang et al. (2008, ); Jiang et al. (2009, )] for linear and generalised linear models.

The mplot package provides a collection of functions designed for exploratory model selection.

We implement model stability and variable importance plots (Mueller and Welsh (2010); Murray, Heritier and Mueller (2013)) as well as the adaptive fence (Jiang et al. (2008); Jiang et al. (2009)) for linear and generalised linear models. We address many practical implementation issues with sensible defaults and interactive graphics to highlight model selection stability. The speed of implementation comes from the leaps package and multicore support for bootstrapping.

The mplot currently only supports linear and generalised linear models, however work is progressing to incorporate survival models and mixed models.

You can see an example of the output here.

Check that you're running the most recent versions of your currently installed R packages:


The mplot package is now on CRAN:


You can use the devtools package to install the development version of mplot from Github:

# install.packages("devtools")

If you use this package to inform your model selection choices, please use the following citation:

  • Tarr G, Mueller S and Welsh A (2015). “mplot: An R package for graphical model stability and variable selection.” arXiv:1509.07583 [stat.ME], < URL: >.

From R you can use:


After you've used the development version you may like to remove it to avoid any potential conflicts in the future:

detach("package:mplot", unload=TRUE)

If you do this, then the next time you want to use it, you'll need to install the package again.


  • reimplemented classic plots in ggplot2
  • classic plots are now default (reviewer feedback)
  • improved documentation
    • more detail about procedures
    • more detail about plotting methods
  • fixed the passing of weights for weighted models
  • can now obtain full loss v dimension which="lvk" plots for glms
  • vis() default is now nbest="all".
  • experimental support for glmulti as a backend instead of bestglm for glms for the vis function. This enables users to enforce marginality constraints.
  • maintenance, larger update coming soon
  • added fev and wallabies dataset
  • added tag option to googleVis plots to facilitate easier plotting in rmarkdown documents.
  • citation updated to reference arXiv article
  • bootstrapping glmnet (bglmnet) function refined and added to the mplot() shiny interface
  • Fix for undefined globals (CRAN submission)
  • Release to coincide with JSS article
  • Implements "all" for vis function
  • Improved blmnet plots
  • Consistency with interactive plotting methods
  • Improved documentation
  • Numerous refinements including consistency of style between the classic plots
  • ylim argument for classic boot and lvk plots
  • legend.position argument for classic af plots
  • First CRAN release
  • Reimplemented vis function to avoid massive memory use for moderate model sizes. Now runs much faster and leaner.
  • mplot interface now uses shinydashboard
  • the scatterplot matrix from the mplot shiny interface has now been spun off into its own package: parisD3
  • issue with zooming on transparent reported to GoogleCharts - the workaround is to not use backgroundColor = 'transparent' until it is fixed at the source
  • Limited robustness via screening.
  • Weights now get passed through in the adaptive fence.
  • Changed parallel backend for af() from doMC to doParallel which should work for both unix-like systems and windows.
  • Added redundant variable to vis().
  • Fixed issue with deparse(model.formula) when the model.formula was too long for deparse to cope with.
  • New data sets: diabetes and artificial example
  • First public version

Reference manual

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


0.8.1 by Garth Tarr, 5 days ago,

Browse source code at

Authors: Garth Tarr [aut, cre], Samuel Mueller [aut], Alan H Welsh [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports leaps, foreach, parallel, bestglm, doParallel, doRNG, plyr, shinydashboard, shiny, glmnet, graphics, stats, googleVis, ggplot2, reshape2, scales, dplyr

Suggests knitr, mvoutlier, glmulti, rmarkdown, DT, MASS

See at CRAN