plot.PCLasso2: Plot coefficients from a PCLasso2 object

Description Usage Arguments Value See Also Examples

View source: R/plot.R

Description

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

Usage

1
2
## S3 method for class '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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)

PCLassoReg documentation built on Oct. 26, 2021, 5:07 p.m.