As example two LMM.
lme1 <- lme(mpg ~ cyl + disp,
random = ~1|disp,
method = "ML",
data = mtcars)
lme2 <- lme(mpg ~ cyl * disp,
random = ~1|disp,
method = "ML",
data = mtcars)
AIC table to select the best model.
library(AICcmodavg)
Cand.models <- list( )
Cand.models[[1]] <- lme1
Cand.models[[2]] <- lme2
aictab(Cand.models, sort = TRUE)
Model selection based on AICc:
K AICc Delta_AICc AICcWt Cum.Wt LL
Mod2 6 164.40 0.00 0.94 0.94 -74.52
Mod1 5 169.87 5.46 0.06 1.00 -78.78
To export the AIC table I like to use the tab_df() function.
library(sjPlot)
tab_df(aictab(Cand.models, sort = TRUE))
Unnecessary the tab_df() functions add the column "ModelLik" to the table, how can I avoid this?