Learn R Programming

mplot: graphical model stability and variable selection procedures

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.

Installation

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

update.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:

install.packages("mplot")
library("mplot")

Development version on Github

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

# install.packages("devtools")
devtools::install_github("garthtarr/mplot")
library(mplot)

Usage

A reference manual is available at garthtarr.github.io/mplot

Citation

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:

citation("mplot")
toBibtex(citation("mplot"))

Copy Link

Version

Install

install.packages('mplot')

Monthly Downloads

432

Version

1.0.6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

July 10th, 2021

Functions in mplot (1.0.6)

fev

Forced Expiratory Volume
bglmnet

Model stability and variable importance plots for glmnet
af

The adaptive fence procedure
mplot

Model selection and stability curves
glmfence

The fence procedure for generalised linear models
diabetes

Blood and other measurements in diabetics
bodyfat

Body fat data set
lmfence

The fence procedure for linear models
vis

Model stability and variable inclusion plots
mplot-package

Graphical model stability and model selection procedures
txt.fn

Print text for fence methods
summary.af

Summary method for an af object
print.af

Print method for an af object
plot.af

Plot diagnostics for an af object
artificialeg

Artificial example
wallabies

Rock-wallabies data set
%>%

Pipe operator
process.fn

Process results within af function
print.vis

Print method for a vis object
plot.vis

Plot diagnostics for a vis object
plot.bglmnet

Plot diagnostics for a bglmnet object