1

I am working on a very large data set, where I am comparing 2 genes. Currently I am trying to test

H0: correlation = 0.64

HA: correlation > 0.64 at the alpha = 0.05 level.

At first I thought I could use cor.test() or cor() with an argument to set the 0.64, but I am not seeing that as an option. I'm not really sure where to go with this.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
Jamie Leigh
  • 85
  • 1
  • 9
  • 2
    Pedantic point: Your hypotheses don't match. If correlation < 0.64 you must reject them both, and that makes no sense. – Jeremy Miles Nov 06 '16 at 19:45
  • Is it possible the value $0.64$ is an estimate from other data? If so, the uncertainty in that estimate should be incorporated in your test. In other words, perhaps the null hypothesis ought to be that the two datasets have the same correlation, not that the current one actually has a correlation of $0.64$. – whuber Nov 06 '16 at 21:10
  • 1. How do the null value and the one-tailed alternative arise? 2. What kinds of measurements are the correlations between? – Glen_b Nov 07 '16 at 02:37
  • I closed the other thread as a duplicate of this one. This thread has an answer, whereas the other doesn't & the comments are mostly about R syntax, rather than the statistical issues (as here). – gung - Reinstate Monica Nov 07 '16 at 13:52

1 Answers1

1

The function cor.test() seems to do the trick.

set.seed(1)
x <- runif(100, 0.0, 1.0)
y  <- 2*x + runif(100, 0.0, 1.0)
cor.test(x,y,alternative = "greater", conf.level = 0.95)

The output will report a confidence interval. If the desired value stated in your null hypothesis is not covered by this interval, the null hypothesis can be rejected on the respective significance level.

33d1v
  • 52
  • 2
  • 1
    -1 Checking whether a confidence interval contains a value is not in general a good significance test. See http://stats.stackexchange.com/questions/169141/is-rejecting-the-hypothesis-using-p-value-equivalent-to-hypothesis-not-belonging – Kodiologist Nov 06 '16 at 20:33