wviechtb / metafor

A meta-analysis package for R
https://www.metafor-project.org
229 stars 52 forks source link

vtype = AV #87

Closed Stach5 closed 3 weeks ago

Stach5 commented 2 months ago

Classification:

Question/bug

Summary

Using the escalc function, with measure = MN, I receive an error when I choose AV for vtype. My colleague is able to use vtype = AV for this measure, but I receive the error that vtype must be either LS or HO.



Z_test<-
  Z_test %>% 
  escalc(ni = Z_test$n_patients, mi = Z_test$mean_zscore, sdi = Z_test$sd_zscore, vtype = "AV", data = ., measure = "MN", append = TRUE)

Error in escalc(ni = Z_test$n_patients, mi = Z_test$mean_zscore, sdi = Z_test$sd_zscore,  : 
  For this outcome measure, 'vtype' must be either 'LS' or 'HO'. 
wviechtb commented 2 months ago

For this measure, vtype="AV" has never been an option. This wouldn't make any sense to begin with, since the sampling variance is not a function of the outcome itself. I would have to start digging through the code of older version to check this, but maybe vtype was simply ignored in the past for this measure.