ggmoddiag: Plot model diagnostics in a grid, with inputs.

Description Usage Arguments Details Examples

View source: R/ggmoddiag.r

Description

Plot model diagnostics in a grid, with inputs.

Usage

1
2
3
4
5
6
7
8
ggmoddiag(
  model,
  toplot = "points",
  which = c(1:3, 5),
  mfrow = c(1, 1),
  returnwhat = "plots",
  ...
)

Arguments

model

A model object, can be from lm() or glm() call I think.

which

Which plots to print out.

mfrow

Number of rows and columns of output.

...

Passed on to somewhere...

data

The data that was used in the model.

tplot

Plot points or text labels.

Details

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

Examples

1
2
3
4
5
6
7
## Not run: 
library(ggplot2)
data(mtcars)
mod <- lm(mpg ~ qsec, data=mtcars)
ggmoddiag(mod, which=1:6, mfrow=c(3,2))

## End(Not run)

sckott/sacbox documentation built on Sept. 3, 2020, 7:22 p.m.