lasso_augmented_estimate: Estimate lasso model using tsibble with regressors

Description Usage Arguments Details Value Examples

View source: R/modelling.R

Description

Estimate lasso model using tsibble with regressors

Usage

1
lasso_augmented_estimate(augmented, target = "value", seed = 777)

Arguments

augmented

tsibble with all predictors with lags. May be obtained using 'augment_tsibble_4_regression'.

target

name of the target variable

seed

random seed

Details

Estimate lasso model using tsibble with regressors Regressors should already include lags, fourier terms, trend etc

Value

lasso model

Examples

1
2
3
4
test_ts = stats::ts(rnorm(100), start = c(2000, 1), freq = 12)
test_tsibble = tsibble::as_tsibble(test_ts) %>% dplyr::rename(date = index)
augmented = augment_tsibble_4_regression(test_tsibble, h = 4)
model = lasso_augmented_estimate(augmented)

kassandra-ru/kassandr documentation built on Jan. 1, 2022, 7:39 a.m.