The following function produces in- and out-of-sample MAPA forecasts, for multiple steps ahead.
This is the recommended function to use in forecasting with MAPA.
Combination operator. One of "mean" or "median". Default is "mean".
outplot
Provide output plot. 0 = no; 1 = yes. Default is 1.
hybrid
Provide hybrid forecasts, as in Kourentzes et al. paper. If minimumAL > 1 then the minimumAL ETS forecasts are used. Default is TRUE.
conf.lvl
Vector of confidence level for prediction intervals. Values must be (0,1). If conf.lvl == NULL then no intervals are calculated. For example to get the intervals for 80% and 95% use conf.lvl=c(0.8,0.95).
Value
infor
In-sample forecasts.
outfor
Out-of-sample forecasts.
PI
Prediction intervals for given confidence levels.
MSE
In-sample MSE error.
MAE
In-sample MAE error.
Note
The calculation of the prediction intervals is based on the empirical multiple step ahead MSE. To speed up calculations set conf.lvl=NULL. If very long forecast horizons are requested then once no more t+h MSE can be calculated the following approximation is used: sqrt(MSE_t+1)*sqrt(h) for the error.
Author(s)
Nikolaos Kourentzes and Fotios Petropoulos
References
Kourentzes N., Petropoulos F., Trapero J.R., 2014. Improving forecasting by estimating time
series structural components across multiple frequencies, International Journal of Forecasting,
30(2), 291-302.
See Also
mapa, mapaest, mapacalc.
Examples
mapafit <- mapaest(admissions,outplot=0)
out <- mapafor(admissions,mapafit)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MAPA)
Loading required package: forecast
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: timeDate
This is forecast 7.1
Loading required package: parallel
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MAPA/mapafor.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mapafor
> ### Title: MAPA Forecast
> ### Aliases: mapafor
> ### Keywords: ~mapa ~mapacalc ~mapaest
>
> ### ** Examples
>
> mapafit <- mapaest(admissions,outplot=0)
> out <- mapafor(admissions,mapafit)
>
>
>
>
>
> dev.off()
null device
1
>