Compute the slope & intercept beforehand:
slope = (quantile(data$residual,p=.75)-quantile(data$residual,.25))/(qnorm(.75)-qnorm(.25))
intercept = quantile(data$residual,.25) - slope*qnorm(.25)
qq_line = data.frame(intercept=intercept,slope=slope)
Then:
ggplot(data, na.rm=T) +
geom_point(aes(sample=residual), stat="qq",distribution=qnorm) +
geom_abline(
data = qq_line
,aes(
intercept = intercept
,slope=slope
)
)
--
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University
Looking to arrange a meeting? Check my public calendar:
http://tr.im/mikes_public_calendar
~ Certainty is folly... I think. ~