[R] compute p/t value from pearson r and n
dwinsemius at comcast.net
Mon Feb 25 00:12:03 CET 2013
On Feb 24, 2013, at 1:29 PM, Martin Batholdy wrote:
> Dear Miguel,
> 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?
You are ignoring the fact that the code is readily accessible. It first calculates the cor() results and then works with it using that vale and the numbers of cases. It doesn't seem to me that it should be at all difficult to modify the code to take cor() and N and return a statistic of your choosing.
> On Feb 24, 2013, at 22:24 , Miguel Manese <jjonphl at gmail.com> wrote:
>> Hi Martin,
>> See ?cor.test
>> - Jon
>> On Mon, Feb 25, 2013 at 5:06 AM, Martin Batholdy
>> <batholdy at googlemail.com> wrote:
>>> is there a predefined function that computes the p- or t-value
>>> based on a correlation coefficient and its sample size?
>>> R-help at r-project.org mailing list
>>> 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
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Alameda, CA, USA
More information about the R-help