plot.sdwd: plot coefficients for the sparse DWD

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

View source: R/p.sdwd.R

Description

Plots the solution paths for a fitted sdwd object.

Usage

1
2
## S3 method for class 'sdwd'
plot(x, xvar=c("norm", "lambda"), color=FALSE, label=FALSE, ...)

Arguments

x

A fitted sdwd model.

xvar

Specifies the X-axis. If xvar == "norm", plots against the L1-norm of the coefficients; if xvar == "lambda" against the log-lambda sequence.

color

If TRUE, plots the curves with rainbow colors; otherwise, with gray colors (default).

label

If TRUE, labels the curves with variable sequence numbers. Default is FALSE.

...

Other graphical parameters to plot.

Details

Plots the solution paths as a coefficient profile plot. This function is modified based on the plot function from the gcdnet and the glmnet packages.

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

print.sdwd, predict.sdwd, coef.sdwd, plot.sdwd, and cv.sdwd.

Examples

1
2
3
4
5
6
7
8
9
data(colon)
fit = sdwd(colon$x, colon$y)
par(mfrow=c(1,3))
# plots against the L1-norm of the coefficients
plot(fit) 
# plots against the log-lambda sequence
plot(fit, xvar="lambda", label=TRUE)
# plots with colors
plot(fit, color=TRUE)

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