View source: R/select.glmnetcr.R
select.glmnetcr | R Documentation |
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
select.glmnetcr(fit, which = "BIC")
fit |
a |
which |
determines whether the step is associated with the optimal |
A numeric value of length one representing the step number.
Kellie J. Archer, archer.43@osu.edu
See Also as coef.glmnetcr
, nonzero.glmnetcr
, fitted.glmnetcr
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.