Learn R Programming

performance (version 0.4.3)

performance_lrt: Likelihood-Ratio-Test for Model Comparison

Description

Compute Likelihood-Ratio-Test for model comparison.

Usage

performance_lrt(...)

Arguments

...

Multiple model objects, which should respond to anova().

Value

A data frame, based on the results from anova().

Details

This only makes statistical sense if the models are nested. It is conventional to list the models from smallest to largest, but this is up to the user. The ouput shows the tests of the models against one another in the order specified.

See Also

compare_performance() to compare performance of many different models.

Examples

Run this code
# NOT RUN {
m1 <- lm(mpg ~ wt + cyl, data = mtcars)
m2 <- lm(mpg ~ wt + cyl + gear, data = mtcars)
m3 <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
performance_lrt(m1, m2, m3)

# }

Run the code above in your browser using DataLab