m1_ml | R Documentation |
M1 for mulilevel meta-analytic models, based on Yang et al. (2023). Under multilevel models, we can have multiple M1 - TODO - we need to cite original M1 paper
m1_ml(model, boot = NULL)
model |
Model object of class |
boot |
Number of simulations to run to produce 95 percent confidence intervals for M1. Default is |
A data frame containing all the model results including mean effect size estimate, confidence, and prediction intervals
Shinichi Nakagawa - s.nakagawa@unsw.edu.au
Daniel Noble - daniel.noble@anu.edu.au
TODO
## Not run:
# IMPORTANT NOTE ** boot = 10 is set LOW deliberately to make the models run fast. You should always run for at least boot = 1000
# 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)
M1_eng_1 <- m1_ml(english_MA, boot = 10)
M1_eng_2 <- m1_ml(english_MA)
## Fish example
data(fish)
warm_dat <- fish
model <- metafor::rma.mv(yi = lnrr, V = lnrr_vi,
random = list(~1 | group_ID, ~1 | es_ID),
mods = ~ experimental_design + trait.type + deg_dif + treat_end_days,
method = "REML", test = "t", data = warm_dat,
control=list(optimizer="optim", optmethod="Nelder-Mead"))
M1_fish_1 <- m1_ml(model, boot = 10)
M1_fish_2 <- m1_ml(model)
# 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)
M1_lim_1 <- m1_ml(lim_MR, boot = 10)
M1_lim_2 <- m1_ml(lim_MR)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.