Description Usage Arguments Value Author(s) Examples
This function plots the solution paths of LASSO and MCP solutions.
1 | paths.plot(result, penalty = "MCP", n_kappa = 1)
|
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 |
Generate the paths plots.
Hao Chai
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.