The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


analyses:konstantopoulos2011

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:konstantopoulos2011 [2020/05/01 14:01] Wolfgang Viechtbaueranalyses:konstantopoulos2011 [2021/10/20 19:03] Wolfgang Viechtbauer
Line 260: Line 260:
 We can fit the same model using a multivariate parameterization, which directly provides us with the ICC. For this, we use the syntax: We can fit the same model using a multivariate parameterization, which directly provides us with the ICC. For this, we use the syntax:
 <code rsplus> <code rsplus>
-res.mv <- rma.mv(yi, vi, random = ~ factor(study| district, data=dat)+res.mv <- rma.mv(yi, vi, random = ~ study | district, data=dat)
 print(res.mv, digits=3) print(res.mv, digits=3)
 </code> </code>
Line 268: Line 268:
 Variance Components: Variance Components:
  
-outer factor: district      (nlvls = 11) +outer factor: district (nlvls = 11)                                                                                    
-inner factor: factor(study(nlvls = 56)+inner factor: study    (nlvls = 56)
  
            estim   sqrt  fixed             estim   sqrt  fixed 
Line 286: Line 286:
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 </code> </code>
-The ''random = ~ factor(study| district'' argument adds correlated random effects for the different studies within districts to the model, where the variance-covariance matrix of the random effects takes on a compound symmetric structure (''struct="CS"'' is the default). Note that the estimate of $\rho$ that is obtained is exactly the same as the ICC value we computed earlier based on the multilevel model. Also, the estimate of $\tau^2$ obtained from the multivariate parameterization is the same as the total amount of heterogeneity computed earlier based on the multilevel model. Note that ''random = ~ factor(school| district'' would again yield the same results.+The ''random = ~ study | district'' argument adds correlated random effects for the different studies within districts to the model, where the variance-covariance matrix of the random effects takes on a compound symmetric structure (''struct="CS"'' is the default). Note that the estimate of $\rho$ that is obtained is exactly the same as the ICC value we computed earlier based on the multilevel model. Also, the estimate of $\tau^2$ obtained from the multivariate parameterization is the same as the total amount of heterogeneity computed earlier based on the multilevel model. Note that ''random = ~ school | district'' would again yield the same results.
  
 As long as $\rho$ is estimated to be positive, the multilevel and multivariate parametrizations are in essence identical. In fact, the log likelihoods of the two models should be identical, which we can confirm with: As long as $\rho$ is estimated to be positive, the multilevel and multivariate parametrizations are in essence identical. In fact, the log likelihoods of the two models should be identical, which we can confirm with:
Line 348: Line 348:
 Finally, for illustration purposes, it is instructive to examine what can happen when we fit an overparameterized model. For example, suppose we combine the multilevel and multivariate structures above in a single model: Finally, for illustration purposes, it is instructive to examine what can happen when we fit an overparameterized model. For example, suppose we combine the multilevel and multivariate structures above in a single model:
 <code rsplus> <code rsplus>
-res.op <- rma.mv(yi, vi, random = list(~ factor(study| district, ~ 1 | district, ~ 1 | study), data=dat)+res.op <- rma.mv(yi, vi, random = list(~ study | district, ~ 1 | district, ~ 1 | study), data=dat)
 print(res.op, digits=3) print(res.op, digits=3)
 </code> </code>
Line 360: Line 360:
 sigma^2.2  0.026  0.162     56     no     study  sigma^2.2  0.026  0.162     56     no     study 
  
-outer factor: district      (nlvls = 11) +outer factor: district (nlvls = 11) 
-inner factor: factor(study(nlvls = 56)+inner factor: study    (nlvls = 56)
  
            estim   sqrt  fixed             estim   sqrt  fixed 
analyses/konstantopoulos2011.txt · Last modified: 2022/08/22 16:00 by Wolfgang Viechtbauer