[R] how to draw a 45 degree line on qqnorm() plot?

Terry Mu muster at gmail.com
Sun Apr 3 10:10:25 CEST 2005


Thank you. I didn't know scale(). 

Qqline passes through 1st and 3rd quantiles, It doesn't seem very
useful to me. I thought a diagnol line will demonstrate the deviation
from a standard normal. Correct me if I was wrong. Thanks.



On Apr 3, 2005 2:40 AM, Bill.Venables at csiro.au <Bill.Venables at csiro.au> wrote:
> You didn't try very hard.
> 
> Try this, look at it and think about it:
> 
> jj <- scale(sample(1:100, 10))
> qqnorm(jj)
> abline(0, 1)
> 
> Rather than abline, however, most people, however, would use
> 
> qqline(jj)
> 
> in which case you don't need the scaling.
> 
> V.
> 
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Terry Mu
> Sent: Sunday, 3 April 2005 4:00 PM
> To: R-Help
> Subject: [R] how to draw a 45 degree line on qqnorm() plot?
> 
> # I can not draw a 45 degree line on a qqnorm() plot,
> 
> jj <- sample(c(1:100), 10)
> qqnorm(jj)
> 
> abline() don't work.
> Thank you.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list