grplasso (version 0.4-7)

plot.grplasso: Plots the Solution Path of a grplasso Object

Description

Plots the solution path of a grplasso object.

Usage

# S3 method for grplasso
plot(x, type = "coefficients", col = NULL, ...)

Arguments

x

a grplasso object

type

type = "coefficients" plots coefficients with respect to the input variables, even if standardize = TRUE is used in grplasso.

col

a vector indicating the color of the different group paths. The length should equal the number of groups. The same ordering as in the vector index is used with the exception that the unpenalized coefficients are grouped at the beginning of the vector.

...

other parameters to be passed to the plotting functions.

Examples

Run this code
# NOT RUN {
data(splice)

contr <- list(Pos.1 = "contr.sum", Pos.2 = "contr.sum")
lambda <- lambdamax(y ~ Pos.1 * Pos.2, data = splice, model = LogReg(),
                    contrasts = contr, standardize = TRUE) * 0.8^(0:8)

fit <- grplasso(y ~ Pos.1 * Pos.2, data = splice, model = LogReg(),
                lambda = lambda, contrasts = contr, standardize = TRUE,
                control = grpl.control(trace = 0, inner.loops = 0,
                update.every = 1, update.hess = "lambda"))
plot(fit, log = "x")
# }

Run the code above in your browser using DataLab