Learn R Programming

SciencesPo (version 0.11.21)

ggmodel: Diagnostic plots for models

Description

Draw common plots for diagnostic of lm or glm models

Usage

ggmodel(model,toplot="points",which=c(1:3, 5),mfrow=c(1,1),what="plots",...)

Arguments

model
A model object
toplot
What plot is in the top.
which
Which kind of plots will be shown.
mfrow
A pattern to display the plots
what
Return what?
...
graphical parameters to be passed to ggplot.

References

Modified from: http://librestats.com/2012/06/11/autoplot-graphical-methods-with-ggplot2/

See Also

resplot

Examples

Run this code
y <- rnorm(100); x <- rnorm(100)
mod <- lm(y ~ x)
ggmodel(mod)

Run the code above in your browser using DataLab