The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:comp_two_independent_estimates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:comp_two_independent_estimates [2021/05/04 11:06] Wolfgang Viechtbauertips:comp_two_independent_estimates [2022/08/03 11:31] Wolfgang Viechtbauer
Line 49: Line 49:
 </code> </code>
  
-We can now compare the two estimates (i.e., the estimated average log risk ratios) by feeding them back to the ''rma()'' function and using the variable to distinguish the two estimates as a moderator. We use a fixed-effects model, because the (residual) heterogeneity within each subset has already been accounted for by fitting random-effects models above.+We can now compare the two estimates (i.e., the estimated average log risk ratios) by feeding them back to the ''rma()'' function and using the variable to distinguish the two estimates as a moderator. We use a fixed-effects meta-regression model for this purpose, because the (residual) heterogeneity within each subset has already been accounted for by fitting random-effects models above.
 <code rsplus> <code rsplus>
 rma(estimate, sei=stderror, mods = ~ meta, method="FE", data=dat.comp, digits=3) rma(estimate, sei=stderror, mods = ~ meta, method="FE", data=dat.comp, digits=3)
Line 56: Line 56:
 Fixed-Effects with Moderators Model (k = 2) Fixed-Effects with Moderators Model (k = 2)
  
-Test for Residual Heterogeneity: +Test for Residual Heterogeneity:
 QE(df = 0) = 0.000, p-val = 1.000 QE(df = 0) = 0.000, p-val = 1.000
  
-Test of Moderators (coefficient(s) 2): +Test of Moderators (coefficient(s) 2):
 QM(df = 1) = 1.946, p-val = 0.163 QM(df = 1) = 1.946, p-val = 0.163
  
 Model Results: Model Results:
  
-            estimate     se    zval   pval   ci.lb   ci.ub   +            estimate     se    zval   pval   ci.lb   ci.ub
 intrcpt       -0.481  0.217  -2.218  0.027  -0.907  -0.056  * intrcpt       -0.481  0.217  -2.218  0.027  -0.907  -0.056  *
-metarandom    -0.490  0.351  -1.395  0.163  -1.178   0.198   +metarandom    -0.490  0.351  -1.395  0.163  -1.178   0.198
  
 --- ---
Line 78: Line 78:
 </code> </code>
 <code output> <code output>
-  zval +  zval
 -1.395 -1.395
 </code> </code>
Line 98: Line 98:
 R^2 (amount of heterogeneity accounted for):            0.00% R^2 (amount of heterogeneity accounted for):            0.00%
  
-Test for Residual Heterogeneity: +Test for Residual Heterogeneity:
 QE(df = 11) = 138.511, p-val < .001 QE(df = 11) = 138.511, p-val < .001
  
-Test of Moderators (coefficient(s) 2): +Test of Moderators (coefficient(s) 2):
 QM(df = 1) = 1.833, p-val = 0.176 QM(df = 1) = 1.833, p-val = 0.176
  
 Model Results: Model Results:
  
-             estimate     se    zval   pval   ci.lb  ci.ub   +             estimate     se    zval   pval   ci.lb  ci.ub
 intrcpt        -0.467  0.257  -1.816  0.069  -0.972  0.037  . intrcpt        -0.467  0.257  -1.816  0.069  -0.972  0.037  .
-allocrandom    -0.490  0.362  -1.354  0.176  -1.199  0.219   +allocrandom    -0.490  0.362  -1.354  0.176  -1.199  0.219
  
 --- ---
Line 126: Line 126:
 Multivariate Meta-Analysis Model (k = 13; method: REML) Multivariate Meta-Analysis Model (k = 13; method: REML)
  
-Variance Components: +Variance Components:
  
 outer factor: trial (nlvls = 13) outer factor: trial (nlvls = 13)
Line 135: Line 135:
 tau^2.2    0.393  0.627      7     no  random tau^2.2    0.393  0.627      7     no  random
  
-Test for Residual Heterogeneity: +Test for Residual Heterogeneity:
 QE(df = 11) = 138.511, p-val < .001 QE(df = 11) = 138.511, p-val < .001
  
-Test of Moderators (coefficient(s) 2): +Test of Moderators (coefficient(s) 2):
 QM(df = 1) = 1.946, p-val = 0.163 QM(df = 1) = 1.946, p-val = 0.163
  
 Model Results: Model Results:
  
-             estimate     se    zval   pval   ci.lb   ci.ub   +             estimate     se    zval   pval   ci.lb   ci.ub
 intrcpt        -0.481  0.217  -2.218  0.027  -0.907  -0.056  * intrcpt        -0.481  0.217  -2.218  0.027  -0.907  -0.056  *
-allocrandom    -0.490  0.351  -1.395  0.163  -1.178   0.198   +allocrandom    -0.490  0.351  -1.395  0.163  -1.178   0.198
  
 --- ---
Line 164: Line 164:
 </code> </code>
 <code output> <code output>
-        df     AIC     BIC    AICc   logLik    LRT   pval       QE  +        df     AIC     BIC    AICc   logLik    LRT   pval       QE 
-Full     4 29.2959 30.8875 35.9626 -10.6480               138.5113 +Full     4 29.2959 30.8875 35.9626 -10.6480               138.5113
 Reduced  3 27.5948 28.7885 31.0234 -10.7974 0.2989 0.5845 138.5113 Reduced  3 27.5948 28.7885 31.0234 -10.7974 0.2989 0.5845 138.5113
 </code> </code>
  
 So in this example, we would not reject the null hypothesis $H_0: \tau^2_1 = \tau^2_2$ ($p = .58$). So in this example, we would not reject the null hypothesis $H_0: \tau^2_1 = \tau^2_2$ ($p = .58$).
tips/comp_two_independent_estimates.txt · Last modified: 2024/04/18 11:36 by Wolfgang Viechtbauer