View source: R/gg_residual_plots.R
gg_residual_plots | R Documentation |
gg_residual_plots
creates a four-pack of plots similar to the
residual plots returned by Minitab. Plots include (1) a Normal QQ plot of
the residuals, (2) a residuals vs fitted values plot, (3) a histogram
of the residuals, and (4) a plot of residuals vs order.
The 4th plot (residuals vs order),
assumes the data.frame supplied is already in order.
gg_residual_plots(x, ...)
x |
A data.frame object (such as that returned from
|
Residual plot(s) useful for checking model assumptions.
plot.lm, residual_plots, df_from_model
data(npk)
npk.aov <- aov(yield ~ block + N*P*K, npk)
summary(npk.aov)
npk.aov1 <- aov(yield ~ block + N + K, data = npk)
summary(npk.aov1)
summary.lm(npk.aov1)
model.tables(npk.aov1, type = "means", se = TRUE)
plot(npk.aov1)
npk.table <- df_from_model(npk.aov1, type = "rstandard")
gg_residual_plots(npk.table)
rm(list = c("npk", "npk.aov", "npk.aov1", "npk.table"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.