qqdiag | R Documentation |
qqdiag generates a qqplot with a complementary histogram of the residuals to illustrate the proportion of all residuals along the qqline. If the qqline deviates from the expected straigt line, which is red i colour to make for simpler comparisons, then the histogram enables one to estiamte what proportion of records deviate from normality. The zero point is identified with a line, as are the approximate 5 below the blue lines, with < 90 proportions in each class. To get a more precise estimate use the invisibly returned histogram values.
qqdiag(
inmodel,
plotrug = FALSE,
bins = NA,
hline = 0,
xinc = 100,
yinc = 1.1,
ylab = "residuals"
)
inmodel |
the optimum model being considered |
plotrug |
a logical term determining whether a rug is plotted on the qqplot. |
bins |
defaults to NA, but can be set to a given series |
hline |
Include some horizontal lines on the histogram. defaults to 0. |
xinc |
the increment for tick marks on the xaxis of the histogram |
yinc |
the increment for tick marks on the y-axis of the histogram |
ylab |
the y-axis label for the histogram, defaults to 'residuals' |
plots a graph and invisibly returns the output from the histogram
## Not run:
y <- rep(1:100,2)
x <- rnorm(200,mean=10,sd=1)
model <- lm(y ~ x)
dev.new(width=6,height=3.5,noRStudioGD = TRUE)
par(mai=c(0.45,0.45,0.15,0.05),font.axis=7)
qqdiag(model,xinc=1,yinc=10,bins=seq(-55,50,2.5))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.