I2: I^2 Function

View source: R/I2.R

I2R Documentation

I^2 Function

Description

Function for calculating commonly reported I^2 measures from MCMCglmm model objects. See Nakagawa and Santos (2012) for detailed explanation on the various types of I^2

Usage

I2(model, v, ME = FALSE, sims = 1500, phylo = FALSE, obs = FALSE)

Arguments

model

The MCMCglmm or metafor model object. Note that if using a metafor model object an observation level random effect must be used to calculate the residual variance. This should be input as "~1|obs" in the random effect list.

v

The vector of sampling variance for each effect size.

ME

A character string with the name of the sampling error random effect. This is important if one wishes to enter the sampling variance matrix in as a sparse matrix (i.e. 'ginverse' argument) for MCMCglmm. Otherwise, assumed that the 'mev' argument is used.

sims

The number of simulations used for calculating confidence intervals on I^2 estimates for metafor objects.

phylo

A character string with the name of the phylogenetic random effect. Defaults to FALSE meaning that no phylogenetic heritability is calculated.

obs

A character string with the name of the observation-level random effect in metafor rma.mv models (e.g. "obs", "effectid", "rowid" etc.). The I^2 value returned for this effect refers to the residual among-effect size heterogeneity.

Value

A data.frame containing the relevant I^2 measures along with the 95 percent confidence / credible intervals.

Author(s)

Daniel Noble - daniel.noble@anu.edu.au

References

Nakagawa, S. and Santos, E.S.A. (2012) Methodological issues and advances in biological meta-analysis. Evolutionary Ecology, 26:1253-1274.


daniel1noble/metaAidR documentation built on Oct. 14, 2023, 3:23 p.m.