multi_backward: Multi-backward step

View source: R/multi_backward.R

multi_backwardR Documentation

Multi-backward step

Description

Remove the worst variables from a model as long as they reduce the given criterion (backward elimination).

Usage

multi_backward(data, crit = mbic, ...)

Arguments

data

an object of class big.

crit

a function defining the model selection criterion. You can use your own function or one of these: bic, mbic, mbic2, aic, maic, maic2.

...

optional arguments to crit.

Details

Type browseVignettes("bigstep") for more details.

Value

An object of class big.

Examples

set.seed(1)
n <- 30
p <- 10
X <- matrix(rnorm(n * p), ncol = p)
y <- X[, 2] + 2*X[, 3] - X[, 6] + rnorm(n)
d <- prepare_data(y, X)
d %>%
  fast_forward(crit = aic) %>%
  multi_backward(crit = bic)


bigstep documentation built on May 31, 2023, 5:36 p.m.