View source: R/S3methods_islasso.path.R
plot.islasso.path | R Documentation |
Generates plots of coefficient profiles, standard errors, gradients, weights, or goodness-of-fit criteria
from a fitted islasso.path
model.
## S3 method for class 'islasso.path'
plot(
x,
yvar = c("coefficients", "se", "gradient", "weight", "gof"),
gof = c("none", "AIC", "BIC", "AICc", "eBIC", "GCV", "GIC"),
label = FALSE,
legend = FALSE,
...
)
x |
An object of class |
yvar |
Character. Specifies what to display on the y-axis. Choices are:
|
gof |
Character. Criterion used for highlighting active variables.
Choices: |
label |
Logical. Whether to annotate curves with variable names. |
legend |
Logical. Whether to display a plot legend. |
... |
Additional graphical parameters, e.g. |
This function visualizes the behavior of the solution path across a sequence of lambda values, helping diagnose coefficient shrinkage, influence of penalty, and variable selection stability.
Produces plots. Does not return an object.
Gianluca Sottile gianluca.sottile@unipa.it
islasso.path
, GoF.islasso.path
, summary.islasso.path
,
coef.islasso.path
, fitted.islasso.path
, predict.islasso.path
## Not run:
n <- 100; p <- 30
beta <- c(runif(10, -2, 2), rep(0, p - 10))
sim <- simulXy(n = n, p = p, beta = beta, seed = 1, family = gaussian())
fit <- islasso.path(y ~ ., data = sim$data, family = gaussian())
plot(fit, yvar = "coefficients", gof = "AICc", label = TRUE)
plot(fit, yvar = "se", gof = "AICc")
plot(fit, yvar = "gradient", gof = "AICc")
plot(fit, yvar = "gof", gof = "AICc")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.