Learn R Programming

penalized (version 0.9-6)

Plotting the LASSO path: Plotting the LASSO path

Description

Plotting a LASSO path fitted using penalized with steps > 1.

Usage

plotpath(object, labelsize = 0.6,...)

Arguments

object
A list of link{penfit} objects calculated for the same data but different lambda1 values. This object can be created using the link{penalized} function using the steps argument.
labelsize
Sets the size of the variable labels in the plot. Set to zero for no variable labels.
...
Any other arguments will be forwarded to the plot function.

See Also

penalized, penfit.

Examples

Run this code
data(nki70)

# Fit the model with the steps argument and plot
pen <- penalized(Surv(time, event), penalized = nki70[,8:77], 
    data = nki70, lambda1=1, steps = 20)

plotpath(pen)

Run the code above in your browser using DataLab