select_optimal_model: Choosing Best Model Based on AIC, BIC and Adjusted R Squared

View source: R/ecometrics.R

select_optimal_modelR Documentation

Choosing Best Model Based on AIC, BIC and Adjusted R Squared

Description

Choosing Best Model Based on AIC, BIC and Adjusted R Squared

Usage

select_optimal_model(models, criterion = "AIC")

Arguments

models

a list of models

criterion

The criterion to select optimal model. Default AIC

Value

list of the results and best model

Author(s)

Mutua Kilai

Examples

data(eduperform)
model1 <- lm(pi ~ hs, data = eduperform)
model2 <- lm(pi ~ hs + ps, data = eduperform)
model3 <- lm(pi ~ hs + ps + sh, data = eduperform)
models <- list(model1, model2, model3)

select_optimal_model(models, criterion= "AIC")


EcoMetrics documentation built on April 3, 2025, 10:06 p.m.