Description Usage Arguments Value
simplelasso
estimates a model using LASSO and
returns a sparse structure.
Cross-validation can be used to select best covariates
combination
1 2 | simplelasso(df, yvar = "incidence", crossvalidation = T, nfolds = 10,
include.intercept = TRUE, lag.order = NULL)
|
df |
Dataframe |
crossvalidation |
Should cross-validation be performed? TRUE or FALSE |
nfolds |
Number of folds for cross-validation. Ignored if
|
simplify |
Boolean indicating whether some factor variables should be dropped |
A list of three elements.
output$model
returns the model.
output$plot
returns a plot. If crossvalidation = F
,
coefficients values when $\lambda$ penalization term
evolves is represented.
If crossvalidation = T
, the RMSE is represented with respect to the
number of variables with non-zero weight
output$coeff
returns the coefficient values returned by the LASSO
(or the coefficients of the RMSE-minimizing model if crossvalidation = T
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.