Reputation: 2639
I am newbie on statistic and need to do some simple correlation test on my thesis work,
I am following this guilde to calculate person correlation between 2 sample result n1 and n2.
The input data:
n1: 2 2 3 5 3 4 4 4 4 4 2 4 4 2 2 4 2 2 2 5 3 2 2 5 5 2 5 5 2 2 2 2 2 2 2 2 4 5 2 5 2
n2: 2 2 3 5 3 4 4 2 2 2 2 4 4 4 2 3 5 2 2 2 4 4 4 3 2 2 2 2 1 1 2 2 2 2 2 2 2 3 2 3 3
The function I call in R:
p = cor.test(n1,n2,method="pearson", conf.level=0.9)
The problem is: no matter what value I set to confidence interval conf.level
, it all calculate to the same value; so parameter conf.level
does not affect the correlation.
Why is it? How could I make the confidence level affects Pearson correlation value?
Upvotes: 0
Views: 157
Reputation: 3249
You can't!
In fact, from the definition of the correlation coefficient, confidence level only affects the confidence interval. In the case of R toolbox, according to Correlation, "confidence level for the returned confidence interval. Currently only used for the Pearson product moment correlation coefficient if there are at least 4 complete pairs of observations"
See also: Confidence interval
Upvotes: 1