plot.SLOPE: Plot coefficients

View source: R/plot.R

plot.SLOPER Documentation

Plot coefficients

Description

Plot the fitted model's regression coefficients along the regularization path.

Usage

## S3 method for class 'SLOPE'
plot(
  x,
  intercept = FALSE,
  x_variable = c("alpha", "deviance_ratio", "step"),
  ...
)

Arguments

x

an object of class "SLOPE"

intercept

whether to plot the intercept

x_variable

what to plot on the x axis. "alpha" plots the scaling parameter for the sequence, "deviance_ratio" plots the fraction of deviance explained, and "step" plots step number.

...

further arguments passed to or from other methods.

Value

An object of class "ggplot", which will be plotted on the current device unless stored in a variable.

See Also

SLOPE(), plotDiagnostics()

Other SLOPE-methods: coef.SLOPE(), deviance.SLOPE(), predict.SLOPE(), print.SLOPE(), score()

Examples

fit <- SLOPE(heart$x, heart$y)
plot(fit)

SLOPE documentation built on Sept. 11, 2024, 5:22 p.m.