Skip to content
Prev 2024 / 5632 Next

[R-meta] R-sig-meta-analysis Digest, Vol 35, Issue 7

Dear Wolfgang,


I have a follow up question to Crystals'. Does bootstrapping also work with regressions that have moderator variables?


I used the link that you provided, http://www.metafor-project.org/doku.php/tips:bootstrapping_with_ma, and ran a regression with "alloc" as a moderator variable and then tried bootstrapping the errors but the std. errrs were calculated as zero. This is the output that i got:


Bootstrap Statistics :
        original  bias    std. error
t1*  -0.51792376       0           0
t2*  -0.44786464       0           0
t3*   0.08899601       0           0
t4*   0.19465035       0           0
t5*  -0.19465035       0           0
t6*  -0.19465035       0           0
t7*  -0.19465035       0           0
t8*   0.26607085       0           0
t9*   0.19465035       0           0
t10* -0.19465035       0           0
t11*  0.19465035       0           0
t12*  0.31363498       0           0
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
  index 0 outside bounds
In addition: Warning messages:
1: In sqrt(tv[, 2L]) : NaNs produced
2: In norm.inter(z, (1 + c(conf, -conf))/2) :
  extreme order statistics used as endpoints



I also tried doing it with my own data set and got the following error:


Error in t.star[r, ] <- res[[r]] :
  number of items to replace is not a multiple of replacement length
In addition: There were 50 or more warnings (use warnings() to see the first 50)

If bootstrapping does indeed work with moderator variables, what might be wrong?

Best
Tarun



Tarun Khanna

PhD Researcher

Hertie School


Friedrichstra?e 180

10117 Berlin ? Germany
khanna at hertie-school.org ? www.hertie-school.org<http://www.hertie-school.org/>