forward {bigstep} | R Documentation |
Forward step
Description
Add the best variable to a model according to the given criterion.
Usage
forward(data, crit = mbic, ...)
Arguments
data |
an object of class |
crit |
a function defining the model selection criterion. You can use
your own function or one of these: |
... |
optional arguments to |
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)
forward(d, crit = bic)
d %>%
forward() %>%
forward() %>%
forward()
[Package bigstep version 1.1.1 Index]