matrix_i2 | R Documentation |
Calculated I2 (I-squared) for mulilevel meta-analytic models, based on a matrix method proposed by Wolfgang Viechtbauer.
matrix_i2(model)
model |
Model object of class |
## Not run:
# English example
data(english)
english <- escalc(measure = "SMD", n1i = NStartControl, sd1i = SD_C, m1i = MeanC, n2i = NStartExpt, sd2i = SD_E, m2i = MeanE, var.names=c("SMD","vSMD"),data = english)
english_MA <- rma.mv(yi = SMD, V = vSMD, random = list( ~ 1 | StudyNo, ~ 1 | EffectID), data = english)
I2_eng <- i2_ml(english_MA, data = english, method = "matrix")
# Lim example
data(lim)
# Add in the sampling variance
lim$vi<-(1/sqrt(lim$N - 3))^2
# Lets fit a meta-regression - I will do Article non-independence. The phylogenetic model found phylogenetic effects, however, instead we could fit Phylum as a fixed effect and explore them with an Orchard Plot
lim_MR<-metafor::rma.mv(yi=yi, V=vi, mods=~Phylum-1,
random=list(~1|Article, ~1|Datapoint), data=lim)
I2_lim <- i2_ml(lim_MR, data=lim, method = "matrix")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.