Skip to content

error in calculation of bootstrapped SE in pf_sv_test() #89

Description

@randridge

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions