Reputation: 75
I have a set of candidate models that I want to average so that I get one estimate and variance for each predictor, weighted by the weight of the model. I've used the following code for glm objects but it's not working for rma.mv models (from package metafor).
Example model:
mod6 <-
rma.mv(
yi = Used_value,
V = Used_variance,
slab = Citation,
mods = ~ Age * Season,
random = ~ 1 | Region,
data = vel.focal,
method = "ML"
)
Ranking models by AICc and selecting candidate set for model averaging:
model.sel(mod1,
mod2,
mod3,
mod4,
mod5,
mod6,
mod7,
rank = "AICc")
cand.set <- subset(rank, weight>=0.1*0.699)
ma.parms<-model.avg(mod3,mod2,mod4)
When I then run summary(ma.parms)
, the output does not provide any estimates and says "Standard errors cannot be calculated because no component models provide them". coef(ma.parms)
and coefficients(ma.parms)
also do not work, since there are no coefficients or produce.
I am having trouble finding other methods of model averaging than just doing it manually. Does anybody know of other packages/functions that have this capability for rma.mv objects?
Upvotes: 0
Views: 97