[R] correlation given p value and sample size

2014-06-16 Thread Witold E Wolski
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@r-project.org mailing list

Re: [R] correlation given p value and sample size

2014-06-16 Thread peter dalgaard
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 wewol...@gmail.com wrote: Hi, Looking for and function which produces the minimum r