paths.plot: Plot the solution paths.

Description Usage Arguments Value Author(s) Examples

Description

This function plots the solution paths of LASSO and MCP solutions.

Usage

1
paths.plot(result, penalty = "MCP", n_kappa = 1)

Arguments

result

a list consists of result from weighted.sparsenet

penalty

Character to specify the penalty. Possible values are "MCP", "SCAD", "LASSO" or "adaptive". Specify whether to plot solution paths for MCP, SCAD, LASSO or adaptive LASSO penalties.

n_kappa

If penalty is "MCP", "SCAD" or "adaptive", the function plots the paths corresponding to the n_kappath kappa.

Value

Generate the paths plots.

Author(s)

Hao Chai

Examples

1
2
3
4
5
6
X = matrix(rnorm(8000), nrow = 20)
beta0 = c(rep(10, 5), rep(0, 395))
y = rnorm(20) + X %*% beta0
delta = rep(1, 20)
result = weighted.sparsenet(X, y, delta, n_kappa = 40, kappa0 = 0.99)
paths.plot(result, n_kappa = 20)

andrewchay/aft-hd documentation built on May 14, 2019, 8:21 a.m.