select.glmnetcr {glmnetcr}R Documentation

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

select.glmnetcr(fit, which = "BIC")

Arguments

fit

a glmnetcr 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, archer.43@osu.edu

See Also

See Also as coef.glmnetcr, nonzero.glmnetcr, fitted.glmnetcr

Examples

data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
glmnet.fit <- glmnetcr(x, y)
AIC <- select.glmnetcr(glmnet.fit, which = "AIC")
AIC
nonzero.glmnetcr(glmnet.fit, s = AIC)

[Package glmnetcr version 1.0.6 Index]