Description Usage Arguments Value Author(s) See Also Examples
Choose the best tuning parameter using BIC criterion.
1 | bic.sparsenet(result, X, y)
|
result |
a list consists of result from weighted.sparsenet. |
X |
Design matrix of size n by p, where n is the sample size and p is the number of variables. This is the original design matrix. |
y |
Response vector of length n. This is the original response variable. |
A list of results.
betalasso |
The fitted vector of coefficients with LASSO penalty. The length is equal to the number of coefficients in the model. |
betamcp |
The fitted vector of coefficients with MCP penalty. The length is equal to the number of coefficients in the model. |
lasso.lambda |
The best lambda value chosen by BIC criteria when LASSO is used as the penalty function. |
mcp.lambda |
The best lambda value chosen by BIC criteria when MCP is used as the penalty function. |
mcp.kappa |
The best kappa value chosen by BIC criteria when MCP is used as the penalty function. |
name.lasso |
The names associated with the selected variables by LASSO penalty. |
name.mcp |
The names associated with the selected variables by MCP penalty. |
Hao Chai <hao.chai@yale.edu>
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)
bic.sparsenet(result, X, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.