build_unconditional_lasso: Build Unconditional LASSO

Description Usage Arguments Examples

View source: R/build_unconditional_lasso.R

Description

This function build a traditional LASSO modelling with external variables to forecast the target variable y, but the x dataframe is used in a unconditional setup, meaning only lagged versions of variables present in x will be used up until their corresponding forcast horizon h.

Usage

1
build_unconditional_lasso(y, x, seasM=NA, lag_span=0, hmax=12, maxlag=12, ...)

Arguments

y

Target series to forecast as data frame or matrix.

x

Explanatory variable with lagged versions set to choose and select from, as data frama with column names. Each column represent an individual variable.

seasM

Seasonal dummies in data frame format with column names.

lag_span

One number. For the explantory variables, how many variables are present in each lag"

hmax

horizons to forecast up to

maxlag

max number of (consequtive) lags that are present in the dataframe x.

...

Other arguments that can be used in the build_lasso() function

Examples

1
# build_unconditional_lasso()

yForecasting/leadingindicators documentation built on Dec. 12, 2021, 3:09 p.m.