diff --git a/R/find_best_model.lmerModLmerTest.R b/R/find_best_model.lmerModLmerTest.R index 07372b1..ca52579 100644 --- a/R/find_best_model.lmerModLmerTest.R +++ b/R/find_best_model.lmerModLmerTest.R @@ -38,7 +38,7 @@ find_best_model.lmerModLmerTest <- function(fit, interaction=TRUE, fixed=NULL, . # Recreating the dataset without NA - dataComplete <- get_all_vars(fit)[complete.cases(get_all_vars(fit)), ] + dataComplete <- fit@frame[complete.cases(fit@frame), ] # fit models @@ -79,4 +79,4 @@ find_best_model.lmerModLmerTest <- function(fit, interaction=TRUE, fixed=NULL, . best <- list(formula = best, by_criterion = by_criterion, table = comparison) return(best) -} \ No newline at end of file +}