parameters
parameters copied to clipboard
parameters_selection for lme4: MuMIn's dredge()
Using MuMIn's dredge() could be interesting BUT throws unnecessary warnings and requires to set global options for na.action, or in the model fit, even though no NaNs.
library(lme4)
library(MuMIn)
model <- lmer(Sepal.Width ~ Sepal.Length * Petal.Width * Petal.Length + (1 | Species), data = iris, na.action = na.fail) # The function needs THE MODEL ot be fitted with this na.action
best <- summary(MuMIn::get.models(MuMIn::dredge(model), 1)[[1]])
https://github.com/cran/MuMIn/blob/master/R/dredge.R
Maybe it could be reimplemented?
I'm no fan of automated model selection, so I've never used dredge. But I think people are interested in such a function.
@DominiqueMakowski Does this have any advantage over the approaches we currently have in https://easystats.github.io/parameters/reference/select_parameters.html?
never used it in the end so 🤷