Learn R Programming

PCLassoReg (version 1.0.0)

plot.PCLasso2: Plot coefficients from a PCLasso2 object

Description

Produces a plot of the coefficient paths for a fitted PCLasso2 object.

Usage

# S3 method for PCLasso2
plot(x, norm = TRUE, ...)

Arguments

x

Fitted PCLasso2 model.

norm

If TRUE, plot the norm of each group, rather than the individual coefficients.

...

Other graphical parameters to plot.

Value

No return value, called for plotting of PCLasso2 objects.

See Also

PCLasso2

Examples

Run this code
# NOT RUN {
# load data
data(classData)
data(PCGroups)

x = classData$Exp
y = classData$Label

PC.Human <- getPCGroups(Groups = PCGroups, Organism = "Human",
Type = "GeneSymbol")

# fit PCLasso2 model
fit.PCLasso2 <- PCLasso2(x, y, group = PC.Human, penalty = "grLasso")

# plot the norm of each group
plot(fit.PCLasso2, norm = TRUE)

# plot the individual coefficients
plot(fit.PCLasso2, norm = FALSE)
# }

Run the code above in your browser using DataLab