Skip to content
Back to formatted view

Raw Message

Message-ID: <24307524.1257180835858.JavaMail.root@elwamui-rustique.atl.sa.earthlink.net>
Date: 2009-11-02T16:53:55Z
From: Peter Flom
Subject: qqplot

David Winsemius <dwinsemius at comcast.net> wrote
>I always assumed that the intercept was zero and the slope = unity.
>
>  y <- rt(200, df = 5)
>  qqnorm(y); qqline(y, col = 2)
>  qqplot(y, rt(300, df = 5))
>  abline(0, 1, col="red")
>

Suppose you have the following

x <- rnorm(500)
y <- 500*(x + runif(500, 0,1))
qqplot(x,y)


Then an abline(0,1) will not be useful; it will be an almost horizontal line. But

m1 <- lm(y~x)
abline(coef(m1))


does the trick.

Peter



Peter L. Flom, PhD
Statistical Consultant
Website: www DOT peterflomconsulting DOT com
Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
Twitter:   @peterflom