tips:computing_adjusted_effects
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
tips:computing_adjusted_effects [2022/08/03 11:32] – Wolfgang Viechtbauer | tips:computing_adjusted_effects [2022/08/30 10:28] – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 60: | Line 60: | ||
</ | </ | ||
- | To make the results easier to interpret, we can exponentiate the estimated average log risk ratio (i.e., $-0.7145$) to obtain an estimate of the average risk ratio.((Strictly speaking, since exponentiation is a non-linear transformation, | + | To make the results easier to interpret, we can exponentiate the estimated average log risk ratio (i.e., $-0.7145$) to obtain an estimate of the average risk ratio.((Strictly speaking, since exponentiation is a non-linear transformation, |
<code rsplus> | <code rsplus> | ||
Line 116: | Line 116: | ||
The results indeed suggest that the size of the average log risk ratio is a function of the absolute latitude of the study locations. | The results indeed suggest that the size of the average log risk ratio is a function of the absolute latitude of the study locations. | ||
- | In such a meta-regression model, there is no longer a single average effect (since | + | In such a meta-regression model, there is no longer a single average effect (since |
<code rsplus> | <code rsplus> | ||
Line 180: | Line 180: | ||
</ | </ | ||
- | The intercept reflects the estimated average log risk ratio for level '' | + | The intercept reflects the estimated average log risk ratio for level '' |
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 198: | Line 198: | ||
Note: The output above was obtained with '' | Note: The output above was obtained with '' | ||
- | But what should we do if we want to compute an ' | + | But what should we do if we want to compute an ' |
<code rsplus> | <code rsplus> | ||
Line 222: | Line 222: | ||
What do these column means above actually represent? They are in fact proportions and indicate that 53.8% of the trials used random allocation (i.e., 7 out of the 13), 30.8% used systematic allocation (i.e., 4 out of the 13), and hence 15.4% used alternating allocation (i.e., 2 out of the 13). The predicted effect computed above is therefore an estimate for a population of studies where the relative frequencies of the different allocation methods are like those observed in the 13 trials included in the meta-analysis. | What do these column means above actually represent? They are in fact proportions and indicate that 53.8% of the trials used random allocation (i.e., 7 out of the 13), 30.8% used systematic allocation (i.e., 4 out of the 13), and hence 15.4% used alternating allocation (i.e., 2 out of the 13). The predicted effect computed above is therefore an estimate for a population of studies where the relative frequencies of the different allocation methods are like those observed in the 13 trials included in the meta-analysis. | ||
- | But we are not restricted to setting the proportions in this way. Another | + | But we are not restricted to setting the proportions in this way. Another approach is to assume that the population to which we want to generalize includes studies where each allocation method is used equally often. For a three-level factor, we then need to set the values for the two dummy variables to 1/3. This yields: |
<code rsplus> | <code rsplus> | ||
Line 280: | Line 280: | ||
Some may scoff at the idea of computing such an ' | Some may scoff at the idea of computing such an ' | ||
+ | |||
+ | ==== Addendum: Using the emmeans Package ==== | ||
+ | |||
+ | The [[https:// | ||
+ | |||
+ | <code rsplus> | ||
+ | install.packages(" | ||
+ | library(emmeans) | ||
+ | </ | ||
+ | |||
+ | For the model that included only '' | ||
+ | |||
+ | <code rsplus> | ||
+ | sav <- emmprep(res2) | ||
+ | emmeans(sav, | ||
+ | </ | ||
+ | <code output> | ||
+ | | ||
+ | | ||
+ | |||
+ | Confidence level used: 0.95 | ||
+ | Intervals are back-transformed from the log scale | ||
+ | </ | ||
+ | |||
+ | Similarly, for the model that included the '' | ||
+ | |||
+ | <code rsplus> | ||
+ | sav <- emmprep(res3) | ||
+ | emmeans(sav, | ||
+ | </ | ||
+ | <code output> | ||
+ | | ||
+ | | ||
+ | |||
+ | Results are averaged over the levels of: alloc | ||
+ | Confidence level used: 0.95 | ||
+ | Intervals are back-transformed from the log scale | ||
+ | </ | ||
+ | |||
+ | Note that the default is to use equal weighting of the levels that are averaged over, so we had to explicitly set '' | ||
+ | |||
+ | <code rsplus> | ||
+ | emmeans(sav, | ||
+ | </ | ||
+ | <code output> | ||
+ | | ||
+ | | ||
+ | |||
+ | Results are averaged over the levels of: alloc | ||
+ | Confidence level used: 0.95 | ||
+ | Intervals are back-transformed from the log scale | ||
+ | </ | ||
+ | |||
+ | Finally, for the model that included both '' | ||
+ | |||
+ | <code rsplus> | ||
+ | sav <- emmprep(res4) | ||
+ | emmeans(sav, | ||
+ | </ | ||
+ | <code output> | ||
+ | | ||
+ | | ||
+ | |||
+ | Results are averaged over the levels of: alloc | ||
+ | Confidence level used: 0.95 | ||
+ | Intervals are back-transformed from the log scale | ||
+ | </ | ||
+ | |||
+ | Note that these results are identical to the ones we obtained earlier using the '' | ||
==== References ==== | ==== References ==== |
tips/computing_adjusted_effects.txt · Last modified: 2023/09/11 16:10 by Wolfgang Viechtbauer