The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:computing_adjusted_effects

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
tips:computing_adjusted_effects [2022/08/30 10:28] Wolfgang Viechtbauertips:computing_adjusted_effects [2023/09/11 16:10] (current) Wolfgang Viechtbauer
Line 180: Line 180:
 </code> </code>
  
-The intercept reflects the estimated average log risk ratio for level ''alternate'' (the reference level), while the other two coefficients estimate how much the average log risk ratios for levels ''random'' and ''systematic'' differ from the reference level. Note that the omnibus test of these two coefficients is actually not significant ($Q_M = 1.77, \mbox{df} = 2, p = .41$), which indicates that there is insufficient evidence to conclude that the average log risk ratio differs across the three levels. However, for illustration purposes, we'll proceed with our analysis of this moderator.+The intercept reflects the estimated average log risk ratio for level ''alternate'' (this is the so-called reference level), while the other two coefficients estimate how much the average log risk ratios for levels ''random'' and ''systematic'' differ from the reference level. Note that the omnibus test of these two coefficients is not actually significant ($Q_M = 1.77, \mbox{df} = 2, p = .41$), which indicates that there is insufficient evidence to conclude that the average log risk ratio differs across the three levels. However, for illustration purposes, we'll proceed with our analysis of this moderator.
  
 First, we can compute the estimated average risk ratios for the three levels with: First, we can compute the estimated average risk ratios for the three levels with:
Line 283: Line 283:
 ==== Addendum: Using the emmeans Package ==== ==== Addendum: Using the emmeans Package ====
  
-The [[https://cran.r-project.org/package=emmeans|emmeans]] package is a popular package that facilitates the computation of such 'estimated marginal means'. The [[:installation#development_version|development version]] of the metafor package provides a wrapper function called ''[[https://wviechtb.github.io/metafor/reference/emmprep.html|emmprep()]]'' that makes it possible to use the emmeans package for computing adjusted effects as shown above. As a first step, let's install and load the emmeans package:+The [[https://cran.r-project.org/package=emmeans|emmeans]] package is a popular package that facilitates the computation of such 'estimated marginal means'. The metafor package provides a wrapper function called ''[[https://wviechtb.github.io/metafor/reference/emmprep.html|emmprep()]]'' that makes it possible to use the emmeans package for computing adjusted effects as shown above. As a first step, let's install and load the emmeans package:
  
 <code rsplus> <code rsplus>
tips/computing_adjusted_effects.txt · Last modified: 2023/09/11 16:10 by Wolfgang Viechtbauer