
Produces a coefficient profile plot of the coefficient or loss paths for a fitted "bess" object.
# S3 method for bess
plot(x, type=c("loss","coefficients","both"), breaks=TRUE, K=NULL, ...)
a "bess" project
Either "both", "solutionPath" or "loss"
If TRUE, then vertical lines are drawn at each break point in the coefficient paths
which break point should the vertical lines drawn at
Other graphical parameters to plot
Canhong Wen, Aijun Zhang, Shijie Quan, and Xueqin Wang.
Wen, C., Zhang, A., Quan, S. and Wang, X. (2020). BeSS: An R Package for Best Subset Selection in Linear, Logistic and Cox Proportional Hazards Models, Journal of Statistical Software, Vol. 94(4). doi:10.18637/jss.v094.i04.
bess
, bess.one
#--------------linear model--------------#
data <- gen.data(500, 20, family = "gaussian", 10, 0.2, 1)
fit <- bess(data$x, data$y, family = "gaussian")
plot(fit, type = "both")
Run the code above in your browser using DataLab