Re: [R] compute p/t value from pearson r and n

2013-02-25 Thread Greg Snow
Or if David's answer seems like too much work you could use the `mvrnorm` function in the MASS package to generate 2 vectors with the given correlation and sample size and feed those vectors to the `cor.test` function. Or Pearson's test can be computed in 1 line of R code without needing any speci

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread David Winsemius
On Feb 24, 2013, at 1:29 PM, Martin Batholdy wrote: > Dear Miguel, > > thanks! > But I actually do not have two vectors but just a correlation coefficient and > want to get the p value. > As far as I can see it, cor.test only works when having raw data pairs or am > I missing something? > >

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread Martin Batholdy
Dear Miguel, thanks! But I actually do not have two vectors but just a correlation coefficient and want to get the p value. As far as I can see it, cor.test only works when having raw data pairs or am I missing something? On Feb 24, 2013, at 22:24 , Miguel Manese wrote: > Hi Martin, > > See

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread Miguel Manese
Hi Martin, See ?cor.test example(cor.test) Regards, - Jon On Mon, Feb 25, 2013 at 5:06 AM, Martin Batholdy wrote: > Hi, > > is there a predefined function that computes the p- or t-value > based on a correlation coefficient and its sample size? > > > thanks! > > ___

[R] compute p/t value from pearson r and n

2013-02-24 Thread Martin Batholdy
Hi, is there a predefined function that computes the p- or t-value based on a correlation coefficient and its sample size? thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http: