simp_forec: Combinate the forecasts and prediction intervals by simple...

Description Usage Arguments Details Value

View source: R/simp_forec.R

Description

The combinated forecasts and prediction intervals are calculated by simple average method.

Usage

1
2
3
4
5
6
7
8
simp_forec(
  dataset,
  level,
  method.num,
  methodname = "comb",
  parallel = FALSE,
  num.cores = 2
)

Arguments

dataset

a list of time series. See details for the required format.

level

the confidence level of prediction intervals that are used for combination.

method.num

the number of methods used for averaging. Methods in the first method.num rows in ff will be selected for simple averaging.

methodname

string. the name used to name the combined forecasting results.

parallel

logical. If TRUE then the calculations are conducted in parallel.

num.cores

the specified amount of parallel processes to be used if parallel = TRUE.

Details

dataset must be a list with each element having the following format:

n

the number of observations in the time series.

h

the number of required forecasts.

period

interval of the time series. Possible values are "YEARLY", "QUARTERLY", "MONTHLY" & "OTHER".

x

a time series of length n (the historical data).

xx

a time series of length h (the future data).

ff

a matrix with F rows and h columns. Each row contains the forecasts of each method in methods.

lower

a list with each element being the matrix of lower bounds for certain confidence level.

upper

a list with each element being the matrix of upper bounds for certain confidence level.

Value

A list with the elements having the following structure

ff

a matrix with F+1 rows and h columns where the first F rows represent the point forecasts of benchmark methods and the last row represents the point forecasts by model averaging.

lower

a list with one element that contains a matrix. The matrix with F+1 rows and h columns where the first F rows represent the lower bounds of benchmark methods and the last row represents the lower bounds by model averaging.

upper

a list with one element that contains a matrix. The matrix with F+1 rows and h columns where the first F rows represent the upper bounds of benchmark methods and the last row represents the upper bounds by model averaging.


xqnwang/fuma documentation built on May 29, 2021, 6:38 a.m.