The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:weights_in_rma.mv_models

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
tips:weights_in_rma.mv_models [2021/11/08 15:17] Wolfgang Viechtbauertips:weights_in_rma.mv_models [2023/08/03 13:37] (current) Wolfgang Viechtbauer
Line 1: Line 1:
 ===== Weights in Models Fitted with the rma.mv() Function ===== ===== Weights in Models Fitted with the rma.mv() Function =====
  
-One of the fundamental concepts underlying a meta-analysis is the idea of weighting: More precise estimates are given more weight in the analysis then less precise estimates. In 'standard' fixed- and random-effects models (such as those that can be fitted with the ''rma()'' function), the weighting scheme is quite simple and covered in standard textbooks on meta-analysis. However, in more complex models (such as those that can be fitted with the ''rma.mv()'' function), the way estimates are weighted is more complex. Here, I will discuss some of those intricacies.+One of the fundamental concepts underlying a meta-analysis is the idea of weighting: More precise estimates are given more weight in the analysis then less precise estimates. In 'standard' equal- and random-effects models (such as those that can be fitted with the ''rma()'' function), the weighting scheme is quite simple and covered in standard textbooks on meta-analysis. However, in more complex models (such as those that can be fitted with the ''rma.mv()'' function), the way estimates are weighted is more complex. Here, I will discuss some of those intricacies.
  
 ==== Models Fitted with the rma() Function ==== ==== Models Fitted with the rma() Function ====
Line 33: Line 33:
 Variable ''yi'' contains the log risk ratios and variable ''vi'' the corresponding sampling variances. Variable ''yi'' contains the log risk ratios and variable ''vi'' the corresponding sampling variances.
  
-We now fit fixed- and random-effects models to these estimates.+We now fit equal- and random-effects models to these estimates.
  
 <code rsplus> <code rsplus>
Line 54: Line 54:
        at=log(c(1/16, 1/4, 1, 4, 8)), digits=c(2L,4L), ilab=w.ee.re, ilab.xpos=c(-6,-4))        at=log(c(1/16, 1/4, 1, 4, 8)), digits=c(2L,4L), ilab=w.ee.re, ilab.xpos=c(-6,-4))
 abline(h=0) abline(h=0)
-addpoly(res.ee, row=-1, atransf=exp+addpoly(res.ee, row=-1) 
-addpoly(res.re, row=-2, atransf=exp)+addpoly(res.re, row=-2)
 text(-6, 15, "EE Model", font=2) text(-6, 15, "EE Model", font=2)
 text(-4, 15, "RE Model", font=2) text(-4, 15, "RE Model", font=2)
Line 91: Line 91:
 ==== Models Fitted with the rma.mv() Function ==== ==== Models Fitted with the rma.mv() Function ====
  
-Models fitted with the ''rma.mv()'' will typically be more complex than those fitted with ''rma()''.((But see [[tips:rma.uni_vs_rma.mv|here]] for a discussion of how ''rma.mv()'' can be used to fit the same models that can be fitted with ''rma()''.)) In particular, they will usually involve multiple random effects and possibly correlated sampling errors. See [[analyses:konstantopoulos2011|Konstantopoulos (2011)]] and [[analyses:berkey1998|Berkey et al. (1998)]] for two illustrative examples. I will use the former example to discuss how the weighting works in such models.+Models fitted with the ''rma.mv()'' function will typically be more complex than those fitted with ''rma()''.((But see [[tips:rma.uni_vs_rma.mv|here]] for a discussion of how ''rma.mv()'' can be used to fit the same models that can be fitted with ''rma()''.)) In particular, they will usually involve multiple random effects and possibly correlated sampling errors. See [[analyses:konstantopoulos2011|Konstantopoulos (2011)]] and [[analyses:berkey1998|Berkey et al. (1998)]] for two illustrative examples. I will use the former example to discuss how the weighting works in such models.
  
 The example involves studies that were conducted at schools that in turn were nested within a higher-ordering grouping variable (districts). This leads to a multilevel structure that we want to account for in the analysis. First, let's copy the data into ''dat'' (just to save some typing down the road) and examine the first 8 rows of the dataset. We see that there are 4 studies in the first and second district each. The example involves studies that were conducted at schools that in turn were nested within a higher-ordering grouping variable (districts). This leads to a multilevel structure that we want to account for in the analysis. First, let's copy the data into ''dat'' (just to save some typing down the road) and examine the first 8 rows of the dataset. We see that there are 4 studies in the first and second district each.
tips/weights_in_rma.mv_models.txt · Last modified: 2023/08/03 13:37 by Wolfgang Viechtbauer