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.

Travis-CI Build Status CRAN_Status_Badge DL_Total

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:


Stable release on CRAN

The mplot package has been on CRAN since June 2015. You can install it from CRAN in the usual way:


Development version on Github

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

# install.packages("devtools")


A reference manual is available at


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

  • Tarr G, Müller S and Welsh AH (2018). "mplot: An R Package for Graphical Model Stability and Variable Selection Procedures." Journal of Statistical Software, 83(9), pp. 1–28. doi: 10.18637/jss.v083.i09.

From R you can use:



mplot 1.0.2 [2018-02-13]

  • Compatibility update with a new version of dplyr.

mplot 1.0.0 [2018-02-13]

  • Version 1.0.0 release to coincide with appearance of Journal of Statistical Software article.
  • Documentation updates.
  • Examples simplified so that run time of each is <5 seconds

mplot 0.8.2 [2017-11-26]

  • The bglmnet function has been been re-written
  • Added boot_size plot option for bglmnet objects
  • Vignettes removed, replaced with pkgdown website

mplot 0.8.1 [2017-11-18]

  • More sensible nbest parameter behaviour in the vis function. Now nbest = "all" reverts back to nbest = 1 for models with more than 15 parameters. This can be overridden by specifying an integer, rather than specifying "all". For large model sizes, if the number specified is too large, it will lead to memory overruns and failures with dependent packages.
  • Fixed vignette/pkgdown issue where there were multiple vignettes created with the same name.

mplot 0.8.0 [2017-11-03]

  • Random seed parameter for reproducible results
  • New website
  • Small fixes for JSS article (e.g. googleVis axis padding)

mplot 0.7.8 [2016-08-17]

  • 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.

mplot 0.7.6 [2016-05-20]

  • maintenance, larger update coming soon

mplot 0.7.5 [2015-11-05]

  • added fev and wallabies dataset

mplot 0.7.4 [2015-10-10]

  • 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

mplot 0.7.1 [2015-09-09]

  • Fix for undefined globals (CRAN submission)

mplot 0.7.0 [2015-09-08]

  • Release to coincide with JSS article
  • Implements "all" for vis function
  • Improved blmnet plots
  • Consistency with interactive plotting methods
  • Improved documentation

mplot 0.6.5 [2015-07-11]

  • 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

mplot 0.6.0 [2015-06-10]

  • First CRAN release
  • Reimplemented vis function to avoid massive memory use for moderate model sizes. Now runs much faster and leaner.

mplot 0.5.5 [2015-04-10]

  • 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

mplot 0.5.0 [2015-02-01]

  • Limited robustness via screening.
  • Weights now get passed through in the adaptive fence.

mplot 0.4.9 [2014-12-05]

  • 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.

mplot 0.4.7 [2014-11-10]

  • New data sets: diabetes and artificial example

mplot 0.4.6 [2014-10-15]

  • 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.


1.0.6 by Garth Tarr, 3 months 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, tidyr, magrittr

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

See at CRAN