get_trend_decay: Generate trend discounts

Description Usage Arguments Value Author(s) Examples

View source: R/auxiliar.R

Description

Regression based models use a linear trend to account for the change in level over time. In practical terms, it is measured as a vector of equidistant integers. Often, the trend component can significantly impact the forecast in the long run. One way to solve this issue is to apply a "discount" on the trend vector, henceforth, reducing the marginal effect on the predictions.

Usage

1
get_trend_decay(y_var_length, trend_decay, horizon = NULL, lag = NULL)

Arguments

y_var_length

integer: Length of the time series

trend_decay

numeric: How rapidly the trend reach the stability.

horizon

integer: How far in time to produce trend discounts.

lag

integer: Lag to be used for cross-validation purposes.

Value

Numerical vector.

Author(s)

Obryan Poyser

Examples

1
2
3
4
## Not run: 
get_trend_discounts()

## End(Not run)

opoyc/autoforecast documentation built on May 18, 2021, 1:29 a.m.