0

I am learning correlation tests, and am trying to test the HO that correlation = 0.64 and the HA that correlation > 0.64 at an alpha=0.05. I am fairly certain I need to use cor.test()

cor.test(x, y, alternative="g", exact=0.64)

But when I run it I get

Pearson's product-moment correlation

data:  x and y
t = 7.9074, df = 36, p-value = 1.101e-09
alternative hypothesis: true correlation is greater than 0
95 percent confidence interval:
0.6702984 1.0000000
sample estimates:
  cor 
0.7966283 

I am not sure this is correct, and feel like I am missing additional arguments.

Jamie Leigh
  • 85
  • 1
  • 9
  • 2
    the help for `?cor.test` indicates that `exact` should be a logical (`TRUE` or `FALSE`). So it is not doing what you think it is. (the `exact=0.64` is coerced to `exact=TRUE` due to `as.logical(0.64)`). – user20650 Nov 06 '16 at 01:01
  • Yes, i agree it needs stats advice, but as it is stated it is not on topic for CV, as it is very focussed on using the correct argument of an R function. Perhaps if the question was rephrased to ask how to test if a correlation was equal to X, in general, while showing efforts in R (s above) it would be on-topic – user20650 Nov 06 '16 at 01:11
  • 1
    Thanks! I'll ask on CV, Maybe I was approaching this the wrong way. I thought it would be like some of the other statistical tests where you could specify what value you are testing like on t.test where you can set mu. – Jamie Leigh Nov 06 '16 at 17:41
  • @ZheyuanLi; is it possible to say it doesnt equal 0.64 as that falls outside the 95% CI? – user20650 Nov 06 '16 at 01:06

0 Answers0