step_AIC: Stepwise model construction and inspection

Description Usage Arguments Value Examples

View source: R/stepAIC_BIC.R

Description

Front-ends to stepAIC and dropterm with changed defaults. step_BIC implements a stepwise selection with BIC as the criterion and step_GIC uses an experimental criterion with a penalty midway between AIC and BIC: the "Goldilocks" criterion.

Usage

1
2
3
4
5
6
7
step_AIC(object, ..., trace = 0, k = 2)

step_BIC(object, ..., trace = 0, k = max(2, log(nobs(object))))

step_GIC(object, ..., trace = 0, k = (2 + log(nobs(object)))/2)

dropterm(object, ..., sorted = TRUE, test = default_test(object), k)

Arguments

object

as for stepAIC

...

additional arguments passed on to main function in MASS

trace, k

as for stepAIC

sorted, test

as for dropterm

Value

A fitted model object after stepwise refinement, or a data frame.

Examples

1
2
3
fm <- glm.nb(Days ~ .^3, quine)
dropterm(fm_aic <- step_AIC(fm))
dropterm(fm_bic <- step_BIC(fm))

BillVenables/WWRUtilities documentation built on Jan. 26, 2021, 10:18 p.m.