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?