compare_models {iNZightRegression} | R Documentation |
Compare regression models using AIC and BIC.
Description
Obtain a quick model comparison matrix for a selection of models
Usage
compare_models(x, ...)
## Default S3 method:
compare_models(x, ...)
## S3 method for class 'svyglm'
compare_models(x, ...)
Arguments
x |
a regression model (lm, glm, svyglm, ...) |
... |
other models |
Value
an 'inzmodelcomp' object containing model comparison statistics
Methods (by class)
-
compare_models(default)
: default method -
compare_models(svyglm)
: method for survey GLMs
Author(s)
Tom Elliott
Examples
m0 <- lm(Sepal.Length ~ 1, data = iris)
m1 <- lm(Sepal.Length ~ Sepal.Width, data = iris)
m2 <- lm(Sepal.Length ~ Sepal.Width + Species, data = iris)
compare_models(m0, m1, m2)
[Package iNZightRegression version 1.3.4 Index]