--
I am not aware of any tool that does that. (That functionality would be useful for me too in some circumstances.)
Here is what I once did to compare a bunch of mixed models programmatically, but it was a simpler situation than what you are describing. Anyway, perhaps this takes a step in the direction you are trying to go.
vars <-
names(df[ , setdiff(names(df), c("group.var", "outcome.var"))])
mod.func <- function(var.name) {
formula <- as.formula(paste("outcome.var", "~", var.name))
do.call(lme,
list(fixed = formula,
random = ~ 1| group.var,
data = df,
method = "ML"))
}
mods <- lapply(vars, mod.func)
mod.fit.stats <- rsquared.glmm(mods)
rownames(mod.fit.stats) <- vars
mod.fit.stats <-
mod.fit.stats[order(mod.fit.stats$AIC) , c("Marginal", "Conditional", "AIC")]
names(mod.fit.stats) <- c("Marginal_R2", "Conditional_R2", "AIC")
mod.fit.stats
Bonnie
Rosie gave a presentation on doing this with glmulti a while ago: http://www.noamross.net/blog/2013/2/20/model-selection-drug.html, but only with fixed effects. It might work if you specify lmer rather than glm as the base model fitting function, but I’m not sure.
--
Check out our R resources at http://www.noamross.net/davis-r-users-group.html
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at http://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.