Fits a SCAD-penalized linear regression model via `ncvreg::cv.ncvreg` and
returns the coefficient vector at `lambda.min`.
Usage
scad_weights(X, y, nfolds = 5, ...)
Arguments
- X
A numeric matrix of predictors.
- y
A numeric response vector.
- nfolds
Number of cross-validation folds. Default is 5.
- ...
Additional arguments passed through to `ncvreg::cv.ncvreg`.
Value
A numeric vector of length `ncol(X)` of variant weights.