multilevel models and model averaging in metafor

Viewed 32

I am trying to run a multilevel model with random effects in metafor but cannot get model selection or model averaging to work with the rma.mv objects.

Here's the model I am trying to run:

full_mod<-rma.mv(yi=yi, V=V, 
                  mods = ~ flux_range*experiment_type
                  +mean_temp_constant*experiment_type
                  +secondary_temp
                  +duration_standard 
                  +exp_age*experiment_type
                  +size*experiment_type
                  +ecosystem*experiment_type
                  +trait_directionality*experiment_type
                  +sqrt(vi),
                  random = list( ~1 | phylo, ~1 | study_id, ~1 | response_id),
                  R = list(phylo=cor), test="t",
                  method="REML", data=dat_ES_final_2)

V is a matrix I calculated myself based on responses that used the same control treatment.

I am trying to run model selections with reduced models of different moderator combinations but when I try to run model.sel or model.avg in the MuMIn package (per the Metafor help guide on model averaging), I get an "Error in f[[2L]] : subscript out of bounds". I'm not sure if it's just that my model is too complicated for the model averging in MuMIn, as the example linked above does not average with rma.mv objects but indicates it's possible?

Any help with figuring out how to do model averaging with complicated style of model would be great

0 Answers
Related