compute_gauss_lasso | R Documentation |
compute_gauss_lasso
takes the variables selected by a lasso procedure, and
uses them to do a simple linear least square regression. Function used is
lm
for non-transformed data (root = NULL), and lm.fit
for
transformed data (root = an integer).
compute_gauss_lasso(
Ypt,
Xp,
delta,
root,
projection = which(rowSums(delta) != 0)
)
Ypt |
(transformed) data |
Xp |
(transformed) matrix of regression |
delta |
regression coefficients obtained with a lasso regression |
root |
the position of the root (intercept) in delta |
Depending on the value of root, the behavior is different. If root is null, then we fit a linear regression with an intercept. If root is equal to an integer, then the "intercept" column of the matrix Xp (that has possibly been trough a multiplication with a Cholesky decomposition of the variance) is included, rather than the intercept.
Named list, with "E0.gauss" the intercept (value at the root); "shifts.gauss" the list of shifts found on the branches; and "residuals" the residuals of the regression
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.