# Mixed models:
if(require(nlme)) {
fm2 <- lme(distance ~ age + Sex, data = Orthodont,
random = ~ 1 | Subject, method = "ML")
ms2 <- dredge(fm2)
# Get top-most models, but fitted by REML:
(confset.d4 <- get.models(ms2, subset = delta < 4, method = "REML"))
if (FALSE) {
# Get the top model:
get.models(ms2, subset = 1)[[1]]
}
}
Run the code above in your browser using DataLab