Description
Usage
Arguments
Details
Value
Author(s)
See Also
Examples
View source: R/thief.R
Takes a time series as input and produces forecasts using
the temporal hierarchical approach of Athanasopoulos et al (2016).
 (y, m = (y), h = m * 2, comb = ("struc", "mse", "ols",
"bu", "shr", "sam"), usemodel = ("ets", "arima", "theta", "naive",
"snaive"), forecastfunction = , )

y 
Time series input

m 
Seasonal period

h 
Forecast horizon

comb 
Combination method of temporal hierarchies, taking one of the following values:
 "struc"
Structural scaling  weights from temporal hierarchy
 "mse"
Variance scaling  weights from insample MSE
 "ols"
Unscaled OLS combination weights
 "bu"
Bottomup combination – i.e., all aggregate forecasts are ignored.
 "shr"
GLS using a shrinkage (to block diagonal) estimate of residuals
 "sam"
GLS using sample covariance matrix of residuals

usemodel 
Model used for forecasting each aggregation level:
 "ets"
exponential smoothing, using the ets function.
 "arima"
arima, using the auto.arima function.
 "theta"
theta method, using the stm function.
 "naive"
random walk forecasts
 "snaive"
seasonal naive forecasts, based on the last year of observed data.

forecastfunction 
Userdefined function to be used instead of usemodel . The
function must take a time series as the first argument, and the forecast horizon
as the second argument. It must return an object of class forecast .

... 
Arguments to be passed to the time series modelling function
(such as ets or auto.arima ), or to forecastfunction .

This function computes the temporal aggregates of y
using
tsaggregates
, then calculates all forecasts using the model function
specified by usemodel
or forecastfunction
, and finally reconciles the
forecasts using reconcilethief
. The reconciled forecasts of y
are returned.
forecast object.
Rob J Hyndman and Nikolaos Kourentzes
reconcilethief
1
2
3
4
5
6
7
8
9
10
11
12  ## Not run:
# Select ARIMA models for all series using auto.arima()
z < (AEdemand[,12], usemodel='arima')
(z)
# Use your own function
ftbats < (y,h,){forecast(tbats(y),h)}
z < (AEdemand[,12], forecastfunction=ftbats)
(z)
## End(Not run)

thief documentation built on May 30, 2017, 2:34 a.m.
Search within the thief package
Search all R packages, documentation and source code