Description Usage Arguments Value Author(s) Examples
View source: R/compareqqnorm.r
The function produces 9 QQ-Plots. One is for the residuals of a model. 8 of them are for a simulated sample of equal size as the first one but simulated from a normal distribution using rnorm. The QQ-plot for the residuals is placed at a random place within the 9 plots. If you immediately can find the QQ-Plot of the residuals, these may not be normally distributed. The place of residuals is printed to the R-console.
1 | compareqqnorm(mod)
|
mod |
a linear model (an lm-object or any other object of which resid(mod) gives a numeric vector of numbers) |
a plot is produced and a number if given which indicates the position of the residuals (1-3 corresponds to the first row, 4-6 to the second row and 7-9 to the third row)
F. Korner
1 2 3 4 | y <- rexp(50)
mod <- lm(y~1)
compareqqnorm(mod)
|
Loading required package: MASS
[1] 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.