View source: R/plot_par_welnet.R
| plot.w.elnet | R Documentation |
w.elnet objects (single-alpha wElnet() output)A method to visualize the weighted error curve across the lambda grid for
a single wElnet fit (i.e. a single, fixed alpha), marking
the selected lambda.min. This is the single-alpha counterpart to
plot.par.w.elnet(), which handles the multi-alpha output of par_wElnet().
## S3 method for class 'w.elnet'
plot(x, log.lambda = TRUE, main = NULL, xlab = NULL, ylab = NULL, ...)
x |
An object of class |
log.lambda |
A logical value. If |
main, xlab, ylab |
Optional strings overriding the plot title and axis labels. If
|
... |
Additional graphical parameters (e.g. |
Invisibly returns x. Called for its side effect of producing a plot.
library(MLSurvey)
data(nhanes2013_sbc)
en.dcv <- wElnet(data = nhanes2013_sbc,
col.y = "HBP", col.x = 2:61,
family = "binomial", alpha = 0.729,
cluster = "SDMVPSU", strata = "SDMVSTRA", weights = "WTSAF2YR",
method = "dCV", k = 10, R = 20)
plot(en.dcv)
plot(en.dcv, main = "My custom title", xlab = "Penalty", ylab = "Error")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.