Description Usage Arguments Details Author(s)
View source: R/functions_lasso.R
Simulates data from a regression model and computes the lasso estimate for this data.
1 |
lambda |
Penalty factor to be applied |
X |
Design matrix of regression problem |
beta |
true value of parameter vector to simulate from |
sigma |
true value of square root of variance parameter for simulating. |
penalize |
Vector giving penalty structure. Supplied to glmnet as ' |
rescale.lambda |
Should lambda be rescaled to account for the default re-scaling done by glmnet? |
ind |
Index of coefficient to be returned. Value of 0 implies all coefficients (i.e. the full parameter vector estimate) |
Simulates data from a regression model with true
coefficient parameter beta
and normal errors with
standard deviation sigma
. Computes the LASSO
estimate for the coefficient vector using the glmnet
function from the package of the same name.
Joshua Keller
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.