mlm.variance.distribution: Calculate I-squared values and variance distribution for...

mlm.variance.distributionR Documentation

Calculate I-squared values and variance distribution for multilevel meta-analysis models

Description

This function calculates values of I^2 and the variance distribution for multilevel meta-analysis models fitted with rma.mv.

Usage

mlm.variance.distribution(x)

Arguments

x

An object of class rma.mv. Must be a multilevel model with two random effects (three-level meta-analysis model).

Details

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.

Value

Returns a data frame containing the results. A plot summarizing the variance distribution and I^2 values can be generated using plot.

Author(s)

Mathias Harrer & David Daniel Ebert

References

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.

Examples

# 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)

MathiasHarrer/dmetar documentation built on April 4, 2024, 6:57 p.m.