glmnet_coefs: glmnet coefficients

View source: R/cva.glmnet.R

glmnet_coefsR Documentation

glmnet coefficients

Description

Convenience function for retrieving coefficients from a glmnet::cv.glmnet model at a specified lambda. Sparsity is removed and non-intercept coefficients are ranked by absolute value.

Usage

glmnet_coefs(fit, s, ...)

Arguments

fit

A glmnet::cv.glmnet fitted model object.

s

Value of lambda. See glmnet::coef.glmnet and glmnet::predict.cv.glmnet

...

Other arguments passed to glmnet::coef.glmnet

Value

Vector or list of coefficients ordered with the intercept first, followed by highest absolute value to lowest.


nestedcv documentation built on April 4, 2025, 2:21 a.m.