forunco: Forunco combination approach

Description Usage Arguments Value Examples

View source: R/ts_combination.R

Description

Combination of univariate time seris methods, using a combination operator of choice for the mean forecasts and prediction intervals.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
forunco(
  y,
  h,
  levels = c(95),
  methods = c("auto_ets", "auto_arima", "auto_thetaf"),
  pp_methods = c("boxcox"),
  point_combination = "median",
  pi_combination_upper = "median",
  pi_combination_lower = "median",
  pool_limit = length(methods),
  error_fun = "rmse",
  weight_fun = "inverse",
  val_h = h,
  sov_only = F,
  max_years = 30,
  val_min_years = 4,
  cv_min_years = 5,
  cv_max_samples = 3,
  allow_negatives = F,
  remove_outliers = F,
  ...
)

Arguments

y

Time series object with historical values.

h

Horizons to be predicted.

levels

Prediction interval levels. Optional, default c(95).

methods

Methods to be combined. Optional, default auto_ets, auto_arima, auto_thetaf.

point_combination

Point forecast combination operator. Optional, default meidan.

pi_combination_upper

combination operator of the upper bound of the prediction intervals. Optional, default max.

pi_combination_lower

combination operator for the lower bounds of the prediction intervals. Optional, default min.

pool_limit

number of methods selected from the pool to reach the final forecasts. Optional, default length(methods).

error_fun

error function to determine the validation performance Optional, default rmse.

weight_fun

weight function for calculating the definitive weights for combination. Optional, default inverse

val_h

The horizon for the validation samples. Optional, default h.

sov_only

Flag indicating whether only single origin validation should be considered. Optional, default TRUE.

max_years

Maxmium of years to consider during model fitting. Optional, default 30.

val_min_years

Minimum years required to conduct single origin validation. Optional, default 4.

cv_min_years

Minimum years required to conduct cross-origin validation. Optional, default 5.

cv_max_samples

Maximum samples that should be considered during cross-validation, i.e. 3 indicates the algorithm validates from 3 origins. Optional, default 3.

allow_negatives

Flag indicating whether to allow negative values or not. Optional, default FALSE.

remove_outliers

Flag indicating whether to automatically remove outliers form the time series. default FALSE

...

passed to the forecasting functions

Value

combined forecasts of time series y including confidence intervals

Examples

1
2
3
4
5
# not run
library(Mcomp)
ts <- M3[[2104]]$x
fcs <- forunco(y = ts, h = 18)
# end not run

yvesmauron/univariate-time-series-forecasting documentation built on March 2, 2020, 12:20 a.m.