Hi Jacob, I have a student using your weight test functions for a project (thank you for providing these) and have discovered what I think is an error in the pv_sv_test() code. Specifically, in the calculation of the bootstrapped SD for the correlations.
The bootstrapping uses the function corfun() [defined inside the pf_sv_test() code], and this function returns the transformed correlations:
return(c(atanh(c1), atanh(c2), atanh(c3)))
But then when the SD is calculated on the bootstrapped correlations, it appears that the Fisher's transformation happens again:
Getting the bootstrapped SD of the correlation, but transforming to # Fisher's Z first
Hi Jacob, I have a student using your weight test functions for a project (thank you for providing these) and have discovered what I think is an error in the pv_sv_test() code. Specifically, in the calculation of the bootstrapped SD for the correlations.
The bootstrapping uses the function corfun() [defined inside the pf_sv_test() code], and this function returns the transformed correlations:
return(c(atanh(c1), atanh(c2), atanh(c3)))
But then when the SD is calculated on the bootstrapped correlations, it appears that the Fisher's transformation happens again:
Getting the bootstrapped SD of the correlation, but transforming to # Fisher's Z first
sd1 <- sd(atanh(bo$t[,1])) sd2 <- sd(atanh(bo$t[,2])) sd3 <- sd(atanh(bo$t[,3]))
I think those atanh() calls should be removed in the calculation of the SDs. (Or, change corfun() so that it returns the untransformed correlations.)
Thanks, -Rebecca