Re: [R] correlation coefficient from qq plot

From: Domenico Vistocco <vistocco_at_unicas.it>
Date: Thu, 06 Dec 2007 09:56:15 +0100

You could use the qqnorm function to obtain the correlation, as:

 > qqp=qqnorm(rstudent(regrname))
 > cor(qqp$x,qqp$y)

If you do not want see the plot (as the qq.plot is richer):  > qqp=qqnorm(rstudent(regrname), plot.it=F)

domenico vistocco

Tom Fitzhugh wrote:
> Hi,
>
> I am trying to figure out how to get the correlation coefficient for a
> QQ plot (residual plot). So to be more precise, I am creating the plot
> like this:
>
> qq.plot(rstudent(regrname), main = rformula, col=1)
>
> But want to also access (or compute) the correlation coefficient for
> that plot.
>
> Thanks,
>
> Tom
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 06 Dec 2007 - 09:00:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Dec 2007 - 09:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.