The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


analyses:raudenbush2009

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
analyses:raudenbush2009 [2020/06/26 06:50] Wolfgang Viechtbaueranalyses:raudenbush2009 [2021/11/08 15:35] Wolfgang Viechtbauer
Line 11: Line 11:
 dat dat
 </code> </code>
-(I copy the dataset into 'dat', which is a bit shorter and therefore easier to type further below). The contents of the dataset are: +(I copy the dataset into ''dat'', which is a bit shorter and therefore easier to type further below). The contents of the dataset are: 
 <code output> <code output>
    study               author year weeks setting tester    yi     vi    study               author year weeks setting tester    yi     vi
Line 36: Line 36:
 Note that there is a typo in Table 16.1 in the book chapter: The observed standardized mean difference for study 10 was $0.80$ and not $0.87$ (cf. Raudenbush and Bryk, 1985, Table 1). Note that there is a typo in Table 16.1 in the book chapter: The observed standardized mean difference for study 10 was $0.80$ and not $0.87$ (cf. Raudenbush and Bryk, 1985, Table 1).
  
-==== Fixed-Effects Model ====+==== Equal-Effects Model ====
  
 The results from a model assuming homogeneous effects can now be obtained with: The results from a model assuming homogeneous effects can now be obtained with:
 <code rsplus> <code rsplus>
-res.FE <- rma(yi, vi, data=dat, digits=3, method="FE") +res.EE <- rma(yi, vi, data=dat, digits=3, method="EE") 
-res.FE+res.EE
 </code> </code>
 <code output> <code output>
-Fixed-Effects Model (k = 19)+Equal-Effects Model (k = 19)
  
-Test for Heterogeneity: +I^2 (total heterogeneity / total variability):   49.76% 
 +H^2 (total variability / sampling variability):  1.99 
 + 
 +Test for Heterogeneity:
 Q(df = 18) = 35.830, p-val = 0.007 Q(df = 18) = 35.830, p-val = 0.007
  
 Model Results: Model Results:
  
-estimate       se     zval     pval    ci.lb    ci.ub           +estimate     se   zval   pval   ci.lb  ci.ub 
-   0.060    0.036    1.655    0.098   -0.011    0.132        +   0.060  0.036  1.655  0.098  -0.011  0.132  .
  
 --- ---
-Signif. codes: ***’ 0.001 **’ 0.01 *’ 0.05 .’ 0.1 ‘ ’ 1+Signif. codes: '***0.001 '**0.01 '*0.05 '.0.1 ' ' 1
 </code> </code>
 These results match exactly what is reported in Table 16.2 (p. 301). In particular, $\hat{\theta} = 0.060$,  $SE[\hat{\theta}] = 0.036$, and $z = 1.66$ for the test $H_0: \theta = 0$. The bounds of a 95% confidence interval for $\theta$ are given by $-0.011$ and $0.132$ (p. 301). However, the true effects are found to be heterogeneous ($Q(18) = 35.83$, $p = .007$) (p. 302). These results match exactly what is reported in Table 16.2 (p. 301). In particular, $\hat{\theta} = 0.060$,  $SE[\hat{\theta}] = 0.036$, and $z = 1.66$ for the test $H_0: \theta = 0$. The bounds of a 95% confidence interval for $\theta$ are given by $-0.011$ and $0.132$ (p. 301). However, the true effects are found to be heterogeneous ($Q(18) = 35.83$, $p = .007$) (p. 302).
- 
-**Sidenote**: The title of the output above indicates that these are the results from a "fixed-effects model" (and not "homogeneous effects model"). To be precise, this means that these results are also correct even if the true effects are heterogeneous, as long as the conclusions are restricted to the $k = 19$ studies included in the meta-analysis. Moreover, since these results are based (by default) on weighted estimation, the model estimate (i.e., $0.060$) is an estimate of the //weighted average// of the true effects in these 19 studies (with inverse variance weights). In fact, since the true effects appear to be heterogeneous, this is really the correct way of interpreting the $0.060$ value. 
  
 ==== Random-Effects Model ==== ==== Random-Effects Model ====
Line 89: Line 90:
 Again, these are the same results reported in Table 16.2 (p. 301). In particular, $\hat{\tau}^2 = .019$, $\hat{\mu} = .084$, $SE[\hat{\mu}] = .052$, and $z = 1.62$ for the test $H_0: \mu = 0$. Again, these are the same results reported in Table 16.2 (p. 301). In particular, $\hat{\tau}^2 = .019$, $\hat{\mu} = .084$, $SE[\hat{\mu}] = .052$, and $z = 1.62$ for the test $H_0: \mu = 0$.
  
-==== Credibility/Prediction Interval ====+==== Prediction Interval ====
  
 Raudenbush (2009) also reports the results from a 95% prediction interval (or "plausible value interval"), which can be obtained with $\hat{\mu} \pm 1.96 \hat{\tau}$. Such an interval can be obtained with: Raudenbush (2009) also reports the results from a 95% prediction interval (or "plausible value interval"), which can be obtained with $\hat{\mu} \pm 1.96 \hat{\tau}$. Such an interval can be obtained with:
Line 240: Line 241:
 res.std <- list() res.std <- list()
  
-res.std$FE   <- rma(yi, vi, data=dat, digits=3, method="FE")+res.std$EE   <- rma(yi, vi, data=dat, digits=3, method="EE")
 res.std$ML   <- rma(yi, vi, data=dat, digits=3, method="ML") res.std$ML   <- rma(yi, vi, data=dat, digits=3, method="ML")
 res.std$REML <- rma(yi, vi, data=dat, digits=3, method="REML") res.std$REML <- rma(yi, vi, data=dat, digits=3, method="REML")
Line 250: Line 251:
 <code output> <code output>
       tau2    mu    se      ci.lb ci.ub       tau2    mu    se      ci.lb ci.ub
-FE   0.000 0.060 0.036 1.655 -0.011 0.132+EE   0.000 0.060 0.036 1.655 -0.011 0.132
 ML   0.013 0.078 0.047 1.637 -0.015 0.171 ML   0.013 0.078 0.047 1.637 -0.015 0.171
 REML 0.019 0.084 0.052 1.621 -0.018 0.185 REML 0.019 0.084 0.052 1.621 -0.018 0.185
Line 264: Line 265:
 res.knha <- list() res.knha <- list()
  
-res.knha$FE   <- rma(yi, vi, data=dat, digits=3, method="FE", test="knha")+res.knha$EE   <- rma(yi, vi, data=dat, digits=3, method="EE", test="knha")
 res.knha$ML   <- rma(yi, vi, data=dat, digits=3, method="ML", test="knha") res.knha$ML   <- rma(yi, vi, data=dat, digits=3, method="ML", test="knha")
 res.knha$REML <- rma(yi, vi, data=dat, digits=3, method="REML", test="knha") res.knha$REML <- rma(yi, vi, data=dat, digits=3, method="REML", test="knha")
Line 274: Line 275:
 <code output> <code output>
       tau2    mu    se      ci.lb ci.ub       tau2    mu    se      ci.lb ci.ub
-FE   0.000 0.060 0.051 1.173 -0.048 0.168+EE   0.000 0.060 0.051 1.173 -0.048 0.168
 ML   0.013 0.078 0.059 1.311 -0.047 0.202 ML   0.013 0.078 0.059 1.311 -0.047 0.202
 REML 0.019 0.084 0.062 1.359 -0.046 0.213 REML 0.019 0.084 0.062 1.359 -0.046 0.213
Line 287: Line 288:
 res.hw <- list() res.hw <- list()
  
-res.hw$FE   <- robust(res.std$FE,   cluster=dat$study, adjust=FALSE)+res.hw$EE   <- robust(res.std$FE,   cluster=dat$study, adjust=FALSE)
 res.hw$ML   <- robust(res.std$ML,   cluster=dat$study, adjust=FALSE) res.hw$ML   <- robust(res.std$ML,   cluster=dat$study, adjust=FALSE)
 res.hw$REML <- robust(res.std$REML, cluster=dat$study, adjust=FALSE) res.hw$REML <- robust(res.std$REML, cluster=dat$study, adjust=FALSE)
Line 303: Line 304:
 HE   0.080 0.114 0.062 1.850 -0.015 0.244 HE   0.080 0.114 0.062 1.850 -0.015 0.244
 </code> </code>
-Note that ''adjust=FALSE'' must be used here to reproduce the results given (however, in practice, the small-sample correction should probably be used).+Note that ''adjust=FALSE'' must be used here to reproduce the results given (however, in practice, the small-sample correction should be used).
  
 ==== Final Note ==== ==== Final Note ====
analyses/raudenbush2009.txt · Last modified: 2022/08/03 17:09 by Wolfgang Viechtbauer