tips:i2_multilevel_multivariate
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
tips:i2_multilevel_multivariate [2021/01/06 11:02] – Wolfgang Viechtbauer | tips:i2_multilevel_multivariate [2022/08/03 11:33] – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== $\boldsymbol{I^2}$ for Multilevel and Multivariate Models ===== | ===== $\boldsymbol{I^2}$ for Multilevel and Multivariate Models ===== | ||
- | The $I^2$ statistic was introduced by Higgins and Thompson in their seminal 2002 paper and has become a rather popular statistic to report in meta-analyses, | + | The $I^2$ statistic was introduced by Higgins and Thompson in their seminal 2002 paper and has become a rather popular statistic to report in meta-analyses, |
For a standard random-effects models, the $I^2$ statistic is computed with $$I^2 = 100\% \times \frac{\hat{\tau}^2}{\hat{\tau}^2 + \tilde{v}}, | For a standard random-effects models, the $I^2$ statistic is computed with $$I^2 = 100\% \times \frac{\hat{\tau}^2}{\hat{\tau}^2 + \tilde{v}}, | ||
Line 26: | Line 26: | ||
<code rsplus> | <code rsplus> | ||
k <- res$k | k <- res$k | ||
- | wi <- 1/dat$vi | + | wi <- 1/res$vi |
vt <- (k-1) * sum(wi) / (sum(wi)^2 - sum(wi^2)) | vt <- (k-1) * sum(wi) / (sum(wi)^2 - sum(wi^2)) | ||
100 * res$tau2 / (res$tau2 + vt) | 100 * res$tau2 / (res$tau2 + vt) | ||
Line 40: | Line 40: | ||
Let's try this out for the example above: | Let's try this out for the example above: | ||
<code rsplus> | <code rsplus> | ||
- | W <- diag(1/dat$vi) | + | W <- diag(1/res$vi) |
X <- model.matrix(res) | X <- model.matrix(res) | ||
P <- W - W %*% X %*% solve(t(X) %*% W %*% X) %*% t(X) %*% W | P <- W - W %*% X %*% solve(t(X) %*% W %*% X) %*% t(X) %*% W | ||
Line 82: | Line 82: | ||
Multivariate Meta-Analysis Model (k = 56; method: REML) | Multivariate Meta-Analysis Model (k = 56; method: REML) | ||
- | Variance Components: | + | Variance Components: |
estim sqrt nlvls fixed | estim sqrt nlvls fixed | ||
Line 88: | Line 88: | ||
sigma^2.2 | sigma^2.2 | ||
- | Test for Heterogeneity: | + | Test for Heterogeneity: |
Q(df = 55) = 578.8640, p-val < .0001 | Q(df = 55) = 578.8640, p-val < .0001 | ||
Model Results: | Model Results: | ||
- | estimate | + | estimate |
- | 0.1847 | + | 0.1847 |
--- | --- | ||
Line 103: | Line 103: | ||
Based on the discussion above, it is now very easy to generalize the concept of $I^2$ to such a model (see also Nakagawa & Santos, 2012). That is, we can first compute: | Based on the discussion above, it is now very easy to generalize the concept of $I^2$ to such a model (see also Nakagawa & Santos, 2012). That is, we can first compute: | ||
<code rsplus> | <code rsplus> | ||
- | W <- diag(1/dat$vi) | + | W <- diag(1/res$vi) |
X <- model.matrix(res) | X <- model.matrix(res) | ||
P <- W - W %*% X %*% solve(t(X) %*% W %*% X) %*% t(X) %*% W | P <- W - W %*% X %*% solve(t(X) %*% W %*% X) %*% t(X) %*% W | ||
Line 136: | Line 136: | ||
Multivariate Meta-Analysis Model (k = 10; method: REML) | Multivariate Meta-Analysis Model (k = 10; method: REML) | ||
- | Variance Components: | + | Variance Components: |
outer factor: trial | outer factor: trial | ||
Line 149: | Line 149: | ||
PD 0.6088 | PD 0.6088 | ||
- | Test for Residual Heterogeneity: | + | Test for Residual Heterogeneity: |
QE(df = 8) = 128.2267, p-val < .0001 | QE(df = 8) = 128.2267, p-val < .0001 | ||
- | Test of Moderators (coefficient(s) 1,2): | + | Test of Moderators (coefficient(s) 1,2): |
QM(df = 2) = 108.8616, p-val < .0001 | QM(df = 2) = 108.8616, p-val < .0001 | ||
Model Results: | Model Results: | ||
- | | + | |
outcomeAL | outcomeAL | ||
outcomePD | outcomePD |
tips/i2_multilevel_multivariate.txt · Last modified: 2022/10/24 10:10 by Wolfgang Viechtbauer