Dear all,
I am using Fisher r to z transformation for pooling partial correlation
estimates over multiple imputed data (number of imputations = 200). The number
of observations in my data is 190. Unfortunately, when i calculate p values for
the pooled estimates, some of them are p > 1 (ranging from 0 to 2).
Here is the syntax I use. Can anybody help me find the error?
nobs <- dim(my_data)[1]
z <- log((1 + pcor)/(1 - pcor))/2
var_z <- rep(1/sqrt(nobs - 3), 200)
combine_z <- MIcombine(results=as.list(z), variances=var_z, call=sys.call())
pcor_pooled <- (exp(2*as.numeric(combine_z[1])) - 1)/
(exp(2*as.numeric(combine_z[1])) + 1)
# Calculate the upper and lower bounds
z_lower <- as.numeric(combine_z[1]) - qnorm(.975)*as.numeric(combine_z[2])
z_upper <- as.numeric(combine_z[1]) + qnorm(.975)*as.numeric(combine_z[2])
pcor_lower <- (exp(2*z_lower) - 1)/(exp(2*z_lower) + 1)
pcor_upper <- (exp(2*z_upper) - 1)/(exp(2*z_upper) + 1)
# Calculate the P-Value
pcor_p <- - as.numeric(combine_z[1])/as.numeric(combine_z[2])
pcor_pvalue <- 2*pnorm(-pcor_p)
Thank you!
Tina
--
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.