metafor中SMCR效应量聚合模型与多层模型估计结果不一致问题
问题:Meta分析中聚合模型与多层模型结果不一致
我正在遵循metafor的研究层面数据聚合指南开展meta分析,作者Viechtbauer提到:
以这种方式聚合估计值时,对这些合并估计值进行meta分析得到的结果与上述多层模型的结果完全一致
但我的结果并不匹配。我猜测差异源于教程用了escalc(measure="SMD"),而我用的是SMCR。
效应量计算代码
df <- escalc(measure="SMCR", m1i=me_post_int, m2i=me_pre_int, sd1i=sd_pre_int, ni=num_int, ri=r_int_imp, data=df, append=TRUE, replace = F, var.names = c("yi_int", "vi_int")) df <- escalc(measure="SMCR", m1i = me_post_c, m2i = me_pre_c, sd1i = sd_pre_c, ni = num_c, ri = r_c_imp, data = df, append=TRUE, replace = F, var.names = c("yi_c", "vi_c")) # 反转负向结局的效应量 df$yi_int <- ifelse(df$direction == "neg", yes = df$yi_int*(-1), no = df$yi_int) df$yi_c <- ifelse(df$direction == "neg", yes = df$yi_c*(-1), no = df$yi_c) df$yi <- df$yi_int - df$yi_c df$vi <- df$vi_int + df$vi_c
多层模型代码及输出(df_pain为df子集)
pain_3lv<- rma.mv(yi, vi, random = ~ 1 | study_id/Unique_ID_ES, method="REML", data=df_pain) pain_3lv
输出结果:
Multivariate Meta-Analysis Model (k = 50; method: REML) Variance Components: estim sqrt nlvls fixed factor sigma^2.1 0.2641 0.5139 14 no study_id sigma^2.2 0.0764 0.2764 50 no study_id/Unique_ID_ES Test for Heterogeneity: Q(df = 49) = 271.0640, p-val < .0001 Model Results: estimate se zval pval ci.lb ci.ub 0.4517 0.1581 2.8568 0.0043 0.1418 0.7616 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
聚合模型代码及输出
agg <- aggregate(df_pain, cluster=study_id, V=vcov(pain_3lv, type="obs"), addk=TRUE) res <- rma(yi, vi, method="EE", data=agg, slab = study_id) res
输出结果:
Equal-Effects Model (k = 14) I^2 (total heterogeneity / total variability): 79.70% H^2 (total variability / sampling variability): 4.93 Test for Heterogeneity: Q(df = 13) = 64.0479, p-val < .0001 Model Results: estimate se zval pval ci.lb ci.ub 0.3016 0.0475 6.3448 <.0001 0.2084 0.3948 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
我能找到的唯一代码差异就是效应量测量方法(SMD vs SMCR),其余完全复制教程代码。我按照指南用了"EE"(固定效应模型),但即使换成REML模型,估计结果还是和原多层模型不一致。
内容的提问来源于stack exchange,提问作者kinbeat
相关产品推荐
相关产品推荐

