SLOPE (version 0.5.0)

plot.SLOPE: Plot coefficients

Description

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

Usage

# S3 method for 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

Run this code
# NOT RUN {
fit <- SLOPE(heart$x, heart$y)
plot(fit)
# }

Run the code above in your browser using DataLab