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
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