mlm.variance.distribution | R Documentation |
This function calculates values of I^2
and the variance distribution for multilevel meta-analysis
models fitted with rma.mv
.
mlm.variance.distribution(x)
x |
An object of class |
This function estimates the distribution of variance in a three-level meta-analysis
model (fitted with the rma.mv
function). The share of variance attributable to
sampling error, within and between-cluster heterogeneity is calculated,
and an estimate of I^2
(total and for Level 2 and Level 3) is provided. The function uses the formula by
Cheung (2014) to estimate the variance proportions attributable to each model component and to derive the I^2
estimates.
Returns a data frame containing the results. A plot summarizing the variance distribution and I^2
values can be generated using plot
.
Mathias Harrer & David Daniel Ebert
Harrer, M., Cuijpers, P., Furukawa, T.A, & Ebert, D. D. (2019). Doing Meta-Analysis in R: A Hands-on Guide. DOI: 10.5281/zenodo.2551803. Chapter 12.
Cheung, M. W. L. (2014). Modeling dependent effect sizes with three-level meta-analyses: a structural equation modeling approach. Psychological Methods, 19(2), 211.
# Use dat.konstantopoulos2011 from the "metafor" package
library(metafor)
# Build Multilevel Model (Three Levels)
m = rma.mv(yi, vi, random = ~ 1 | district/school, data=dat.konstantopoulos2011)
# Calculate Variance Distribution
mlm.variance.distribution(m)
# Use alias 'var.comp' and 'Chernobyl' data set
data("Chernobyl")
m2 = rma.mv(yi = z, V = var.z, data = Chernobyl, random = ~ 1 | author/es.id)
res = var.comp(m2)
# Print results
res
# Generate plot
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.