Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing Correlations different from rho=/0

    Hi everyone,

    Previously in my analysis I was testing whether my correlation coefficient was significantly different from 0. Now I want to alter that so see if it is different from 0.9 (one-tailed test, less than 0.9). However, I was a bit confused when trying to do this with the current code.

    corr `var1' `var2'
    // fill the 4 matrices
    matrix `name'_C[`i',`j']= `r(rho)'
    matrix `name'_N[`i',`j']= `r(N)'
    matrix `name'_P[`i',`j']=2*ttail( `r(N)' -2 ,abs(`r(rho)')*sqrt(`r(N)'-2)/sqrt(1-`r(rho)'^2))
    matrix `name'_T[`i',`j']= abs(`r(rho)')*sqrt(`r(N)'-2)/sqrt(1-`r(rho)'^2)

    Thank you very much
Working...
X