|
|
|
QQ plots> g <- lm(sav ~ p15 + p75 + inc + gro) > motif() > qqnorm(g$res) > qqline(g$res)Looks fine - qqline() adds a line joining the first and third quartiles - it's useful as a guide. We can plot the studentized residuals (assuming you still have the variable stud available).
> qqnorm(stud) > abline(0,1)Because these residuals have been normalized, they should lie along a 45 degree line. We can get an idea of the variation to be expected in QQ-plots in the following experiment. I generate data from different distributions:
> par(mfrow=c(3,3)) > for(i in 1:9) qqnorm(rnorm(50)) > for(i in 1:9) qqnorm(exp(rnorm(50))) > for(i in 1:9) qqnorm(rcauchy(50)) > for(i in 1:9) qqnorm(runif(50)) > par(mfrow=c(1,1)) |