[R] correlation given p value and sample size

peter dalgaard pdalgd at gmail.com
Mon Jun 16 13:17:06 CEST 2014


There's a simple relation 

t = r / sqrt(1 - r^2) * sqrt(n - 2)
r = t / sqrt(n - 2 + t^2)

where t has a t distribution on n-2 df. Insert t = +-qt(p/2, n-2).

-pd


On 16 Jun 2014, at 11:23 , Witold E Wolski <wewolski at gmail.com> wrote:

> Hi,
> 
> 
> Looking for and function which produces the minimum r (pearson
> correlation) so that H0 (r=0) can be rejected, given sample size and
> p-value?
> 
> 
> Witold
> 
> -- 
> Witold Eryk Wolski
> 
> ______________________________________________
> 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.

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list