Learn R Programming

islasso (version 1.6.0)

plot.islasso.path: Coefficient Profile and Diagnostic Plots for islasso.path

Description

Generates plots of coefficient profiles, standard errors, gradients, weights, or goodness-of-fit criteria from a fitted islasso.path model.

Usage

# S3 method for islasso.path
plot(
  x,
  yvar = c("coefficients", "se", "gradient", "weight", "gof"),
  gof = c("none", "AIC", "BIC", "AICc", "eBIC", "GCV", "GIC"),
  label = FALSE,
  legend = FALSE,
  ...
)

Value

Produces plots. Does not return an object.

Arguments

x

An object of class "islasso.path", typically created via islasso.path.

yvar

Character. Specifies what to display on the y-axis. Choices are:

  • "coefficients" - coefficient paths over log(lambda),

  • "se" - standard errors over log(lambda),

  • "gradient" - gradient values over log(lambda),

  • "weight" - mixture weights used in smoothing,

  • "gof" - goodness-of-fit values.

gof

Character. Criterion used for highlighting active variables. Choices: "none", "AIC", "BIC", "AICc", "eBIC", "GCV", "GIC".

label

Logical. Whether to annotate curves with variable names.

legend

Logical. Whether to display a plot legend.

...

Additional graphical parameters, e.g. main, xlab, ylab, xlim, ylim, lty, col, lwd, cex.axis, cex.lab, cex.main, gof_lty, gof_col, gof_lwd.

Author

Gianluca Sottile gianluca.sottile@unipa.it

Details

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.

See Also

islasso.path, GoF.islasso.path, summary.islasso.path, coef.islasso.path, fitted.islasso.path, predict.islasso.path

Examples

Run this code
if (FALSE) {
  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")
}

Run the code above in your browser using DataLab