# The metafor Package

A Meta-Analysis Package for R

### Site Tools

tips:comp_two_independent_estimates

# Differences

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

 tips:comp_two_independent_estimates [2019/05/22 08:42]Wolfgang Viechtbauer tips:comp_two_independent_estimates [2019/05/22 08:54] (current)Wolfgang Viechtbauer Both sides previous revision Previous revision 2019/05/22 08:54 Wolfgang Viechtbauer 2019/05/22 08:42 Wolfgang Viechtbauer 2017/04/23 14:39 Wolfgang Viechtbauer 2016/09/01 18:06 Wolfgang Viechtbauer 2016/03/12 13:57 Wolfgang Viechtbauer 2015/11/22 22:18 Wolfgang Viechtbauer 2015/03/16 09:47 Wolfgang Viechtbauer 2014/12/19 17:52 Wolfgang Viechtbauer 2014/11/23 10:56 Wolfgang Viechtbauer created 2019/05/22 08:54 Wolfgang Viechtbauer 2019/05/22 08:42 Wolfgang Viechtbauer 2017/04/23 14:39 Wolfgang Viechtbauer 2016/09/01 18:06 Wolfgang Viechtbauer 2016/03/12 13:57 Wolfgang Viechtbauer 2015/11/22 22:18 Wolfgang Viechtbauer 2015/03/16 09:47 Wolfgang Viechtbauer 2014/12/19 17:52 Wolfgang Viechtbauer 2014/11/23 10:56 Wolfgang Viechtbauer created Line 1: Line 1: ===== Comparing Estimates of Independent Meta-Analyses or Subgroups ===== ===== Comparing Estimates of Independent Meta-Analyses or Subgroups ===== - Suppose we have summary estimates (e.g., estimated average effects) obtained from two independent meta-analyses or subgroups of studies and we want to test whether the estimates are different from each other. A Wald-type test can be used for this purpose. Alternatively,​ one could run a single meta-regression model including all studies and using a dichotomous moderator to distinguish the two sets. Both approaches are conceptually very similar with a subtle difference that will be illustrated below with an example. + Suppose we have summary estimates (e.g., estimated average effects) obtained from two independent meta-analyses or two subgroups of studies ​within the same meta-analysis ​and we want to test whether the estimates are different from each other. A Wald-type test can be used for this purpose. Alternatively,​ one could run a single meta-regression model including all studies and using a dichotomous moderator to distinguish the two sets. Both approaches are conceptually very similar with a subtle difference that will be illustrated below with an example. ==== Data Preparation ==== ==== Data Preparation ==== Line 49: Line 49: ​ - 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 ​model 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 model, because the (residual) heterogeneity within each subset has already been accounted for by fitting random-effects ​models ​above. 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 81: Line 81: -1.395 -1.395 ​ - This is the same value as obtained above. + This is the same value that we obtained above. ==== Meta-Regression with All Studies ==== ==== Meta-Regression with All Studies ==== - Now let's take a different approach, fitting a meta-regression model using all studies: + Now let's take a different approach, fitting a meta-regression model with ''​alloc''​ as a categorical moderator based on all studies: rma(yi, vi, mods = ~ alloc, data=dat, digits=3) rma(yi, vi, mods = ~ alloc, data=dat, digits=3)
tips/comp_two_independent_estimates.txt · Last modified: 2019/05/22 08:54 by Wolfgang Viechtbauer

### Page Tools 