R2_calc: R2_calc

View source: R/r2_ml.R

R2_calcR Documentation

R2_calc

Description

Calculated R2 (R-squared) for mixed (mulitlevel) models, based on Nakagawa & Schielzeth (2013).

Usage

R2_calc(model)

Arguments

model

Model object of class rma.mv or rma.

Author(s)

Shinichi Nakagawa - s.nakagawa@unsw.edu.au

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

Examples

## Not run: 
data(lim)
lim$vi<-(1/sqrt(lim$N - 3))^2
lim_MR<-metafor::rma.mv(yi=yi, V=vi, mods=~Phylum-1,
random=list(~1|Article, ~1|Datapoint), data=lim)
R2 <- R2_calc(lim_MR)

## End(Not run)

daniel1noble/orchaRd documentation built on May 12, 2024, 7:46 a.m.