coef.cv.sdwd: compute coefficients from a "cv.sdwd" object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/cv.sdwd.R

Description

Computes coefficients at chosen values of lambda from the cv.sdwd object.

Usage

1
2
## S3 method for class 'cv.sdwd'
coef(object, s=c("lambda.1se", "lambda.min"),...)

Arguments

object

A fitted cv.sdwd object, obtained by conducting the cross-validation to the sparse DWD model.

s

Value(s) of the L1 tuning parameter lambda for computing coefficients. Default value is "lambda.1se", which represents the largest lambda value achieving the cross-validation error within one standard error of the minimum. An alternative value is "lambda.min", which is the lambda incurring the least cross-validation error. s can also be numeric, being taken as the value(s) to be used.

...

Other arguments that can be passed to sdwd.

Details

This function computes the coefficients at the values of lambda suggested by the cross-validation. This function is modified based on the coef.cv function from the glmnet and the gcdnet packages.

Value

The returned object depends on the choice of s and the ... argument passed on to the sdwd method.

Author(s)

Boxiang Wang and Hui Zou
Maintainer: Boxiang Wang boxiang-wang@uiowa.edu

References

Wang, B. and Zou, H. (2016) “Sparse Distance Weighted Discrimination", Journal of Computational and Graphical Statistics, 25(3), 826–838.
https://www.tandfonline.com/doi/full/10.1080/10618600.2015.1049700

Yang, Y. and Zou, H. (2013) “An Efficient Algorithm for Computing the HHSVM and Its Generalizations", Journal of Computational and Graphical Statistics, 22(2), 396–415.
https://www.tandfonline.com/doi/full/10.1080/10618600.2012.680324

Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized linear models via coordinate descent," Journal of Statistical Software, 33(1), 1–22.
https://www.jstatsoft.org/v33/i01/paper

See Also

cv.sdwd and predict.cv.sdwd methods.

Examples

1
2
3
4
5
data(colon)
colon$x = colon$x[ , 1:100] # this example only uses the first 100 columns 
set.seed(1)
cv = cv.sdwd(colon$x, colon$y, lambda2=1, nfolds=5)
c1 = coef(cv, s="lambda.1se")

sdwd documentation built on Oct. 27, 2020, 5:06 p.m.