In sample observations of a time series (vector). If y == "paper" then it prints paper reference.
ppy
Periods in a season of the time series at the sampled frequency.
If insample is a ts object then this is taken from its frequency, unless overriden.
fh
Forecast horizon. Default = ppy.
ifh
Lower aggregation level to use. Default = 1.
minimumAL
Lowest aggregation level to use. Default = 1.
maximumAL
Highest aggregation level to use. Default = ppy, maximumAL>1.
comb
Combination operator. One of "mean" or "median". Default is "mean".
paral
Use parallel processing. 0 = no; 1 = yes (requires initialised cluster); 2 = yes and initialise cluster. Default is 0.
display
Display calculation progress in console. 0 = no; 1 = yes. Default is 0.
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.
model
Allow only that type of ETS at each aggregation level. This follows similar coding to the ets function. The first letter refers to the error type ("A", "M" or "Z"); the second letter refers to the trend type ("N","A","Ad","M","Md" or "Z"); and the third letter refers to the season type ("N","A","M" or "Z"). The letters mean: "N"=none, "A"=additive, "M"=multiplicative and "Z"=automatically selected. A "d" for trend implies damped. By default model="ZZZ". If due to sample limitation ETS cannot be calculated at an aggregation level for the selected model, then no estimation is done for that specific level.
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
mapaest, mapafor, mapasimple.
Examples
out <- mapa(admissions)
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/mapa.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mapa
> ### Title: Multiple Aggregation Prediction Algorithm (Wrapper)
> ### Aliases: mapa
> ### Keywords: ~mapaest ~mapafor ~mapasimple
>
> ### ** Examples
>
> out <- mapa(admissions)
>
>
>
>
>
> dev.off()
null device
1
>