r2_ml | R Documentation |
R2 (R-squared) for mixed (mulitlevel) models, based on Nakagawa & Schielzeth (2013).
r2_ml(model, data, boot = NULL)
model |
Model object of class |
data |
Data frame used to fit the |
boot |
The number of parametric bootstrap iterations, if desired. Defaults to |
A data frame containing all model results, including: mean effect size estimate, confidence and prediction intervals, with estimates converted back to r.
Shinichi Nakagawa - s.nakagawa@unsw.edu.au
Daniel Noble - daniel.noble@anu.edu.au
Nakagawa, S, and Schielzeth, H. 2013. A general and simple method for obtaining R2 from generalized linear mixedâeffects models. *Methods in Ecology and Evolution* 4(2): 133-142.
## 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_ml(lim_MR,data=lim, boot = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.