Learn R Programming

psycho (version 0.4.91)

find_best_model.lmerModLmerTest: Returns the best combination of predictors for lmerTest objects.

Description

Returns the best combination of predictors for lmerTest objects.

Usage

# S3 method for lmerModLmerTest
find_best_model(fit, interaction = TRUE,
  fixed = NULL, ...)

Arguments

fit

A merModLmerTest object.

interaction

Include interaction term.

fixed

Additional formula part to add at the beginning of each formula

...

Arguments passed to or from other methods.

Value

list containing all combinations.

Examples

Run this code
# NOT RUN {
library(psycho)
library(lmerTest)

data <- standardize(iris)
fit <- lmerTest::lmer(Sepal.Length ~ Sepal.Width + Petal.Length + (1 | Species), data = data)

best <- find_best_model(fit)
best_formula <- best$formula
best$table
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab