Learn R Programming

ExactPath (version 1.0)

LASSO.exact: Generate Information on the Next Interval for $\lambda$

Description

LASSO.exact() generates the next value of $\lambda_k$ and the associated selection indicator vector.

Usage

LASSO.exact(lambda, tau, X, y)

Arguments

lambda
a numerical value for lambda. It does not need to be one of the $\lambda_k$s.
tau
a vector of length $p$. Its elements are equal to 1, $-1$, or 0. This is the selection indicator vector.
X
an $n\times p$ design matrix for the predictors.
y
a vector of the response values.

Value

Given the value $\lambda \in [\lambda_k, \lambda_{k-1})$ and $\tau(\lambda)$, this function returns a data frame with the following variables:
beta
a vector of length $p$. This is the vector of regression coefficients of the predictors evaluated at $\lambda_k$. Note that for active predictors, their coefficients are non-zero; for inactive predictors their coefficients are equal to 0.
S
a vector of length $p$. This is the vector of scores of the predictors evaluated at $\lambda_k$. Note that for active predictors, the absolute values of their scores should be equal to $\lambda$; for inactive predictors the absolute value of their scores are $\leq \lambda$.
breaks
a vector of length $p$. This is the vector of candidate $\lambda_k$s provided by each predictor. For active predictors, this is the value at which its regression coefficient is equal to 0. For inactive predictors, this is the value at which the absolute value of its score is equal to $\lambda$. The largest value of this vector that is less than $\lambda$ is chosen to be $\lambda_k$.
tau
a vector of length $p$. This is the vector of selection indicators predicted for $\lambda_k^-$.
change
a vector of length $p$. This is the vector of predicted status changes at $\lambda_k^-$: a predictor becomes active ("+"), inactive ("-"), or remains unchanged ("|").

Details

This function computes the next $\lambda_k$ that $\lambda_k<\lambda$. although="" it="" is="" a="" stand-alone="" function,="" meant="" to="" be="" called="" by="" exact.path(). exact.path() automatically finds recursively the $\lambda_k$s and sets up the correct values for tau for each $\lambda_k$.

It is not necessary to standardize the columns of X and the response vector y. Such standardization is conducted anyway in this function.

References

Wang K. (2013) Exact LASSO linear regression. Submitted.

See Also

exact.path automatically generates the whole solution paths.

Examples

Run this code
library(lars)
data(diabetes)
LASSO.exact(0.05, c(0,-1,1,1,0,0,-1,0,1,1), diabetes$x, diabetes$y)

Run the code above in your browser using DataLab