Select Step of Optimal Fitted AIC or BIC CR Model

Description

This function returns the step number associated with the minimum AIC or BIC models for a glmnet.cr object and so can be used in selecting the step number in calls in functions such as coef.glmnet.cr, nonzero.glmnet.cr, and fitted.glmnet.cr

Usage

1
select.glmnet.cr(fit, which = "BIC")

Arguments

fit

a glmnet.cr object

which

determines whether the step is associated with the optimal which="BIC" model or which="AIC" model

Value

A numeric value of length one representing the step number.

Author(s)

Kellie J. Archer, kjarcher@vcu.edu

See Also

See Also as coef.glmnet.cr, nonzero.glmnet.cr, fitted.glmnet.cr

Examples

1
2
3
4
5
6
7
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
glmnet.fit <- glmnet.cr(x, y)
AIC <- select.glmnet.cr(glmnet.fit, which = "AIC")
AIC
nonzero.glmnet.cr(glmnet.fit, s = AIC)