Augment data and estimate lasso model

lasso_fun(model_sample, seed = 777, target = "value", h = 1)

Arguments

model_sample

tsibble that will be augmented with trend etc

seed

random seed

target

name of the target variable

h

forecasting horizon

Value

lasso model

Details

Augment data and estimate lasso model. Trend, fourier terms, lags are added before estimation of lasso model.

Examples

test_ts = stats::ts(rnorm(100), start = c(2000, 1), freq = 12) test_tsibble = tsibble::as_tsibble(test_ts) model = lasso_fun(test_tsibble)