simplelasso: Perform LASSO to select best features

Description Usage Arguments Value

Description

simplelasso estimates a model using LASSO and returns a sparse structure. Cross-validation can be used to select best covariates combination

Usage

1
2
simplelasso(df, yvar = "incidence", crossvalidation = T, nfolds = 10,
  include.intercept = TRUE, lag.order = NULL)

Arguments

df

Dataframe

crossvalidation

Should cross-validation be performed? TRUE or FALSE

nfolds

Number of folds for cross-validation. Ignored if crossvalidation = T

simplify

Boolean indicating whether some factor variables should be dropped

Value

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)


EpidemiumOpenCancer/OpenCancer documentation built on May 12, 2019, 7:46 a.m.