MAPA for intermittent demand data with automatic model selection based on the PK classification.
imapa(data,h=10,w=NULL,minimumAL=1,maximumAL=NULL,comb=c("mean","median"),
init.opt=c(TRUE,FALSE),paral=c(0,1,2),outplot=c(0,1,2,3,4),model.fit=NULL,
na.rm=c(FALSE,TRUE))
In-sample demand rate.
Out-of-sample demand rate.
An array containing information for each aggregation level: AL - Aggregation level; n - Number of observations of aggregated series; p - Average inter-demand interval; cv2 - Coefficient of variation squared of non-zero demand; model - Selected model, where 1 is Croston, 2 is SBA and 3 is SES; use - If == 0 then this aggregation level is ignored because it contains less than 4 observations.
Parameters and initialisation values of fitted model in each aggregation level.
Intermittent demand time series.
Forecast horizon.
Smoothing parameters. If w == NULL then parameters are optimised. If w is w single parameter then the same is used for smoothing both the demand and the intervals. If two parameters are provided then the second is used to smooth the intervals. SES is always optimised.
Lowest aggregation level to use. Default = 1.
Highest aggregation level to use. Default = maximum interval.
Combination operator. One of "mean" or "median". Default is "mean".
If init.opt==TRUE then Croston and SBA initial values are optimised.
Use parallel processing. 0 = no; 1 = yes (requires initialised cluster); 2 = yes and initialise cluster. Default is 0.
Optional plot: 0 = No plot; 1 = Time series and combined forecast; 2 = Time series and all aggregation level forecasts; 3 = Summary model selection plot; 4 = Detailed model selection plot.
Optional input with model types and parameters. This is the model.fit output from this function. If used it overrides other model settings.
A logical value indicating whether NA values should be remove using the method.
Nikolaos Kourentzes
Optimisation of the methods described in: F. Petropoulos and N. Kourentzes, 2015, Forecast Combinations for Intermittent Demand, Journal of Operational Research Society. https://link.springer.com/article/10.1057/jors.2014.62.
https://kourentzes.com/forecasting/2014/05/13/forecast-combinations-for-intermittent-demand/
tsb
, sexsm
, crost
, idclass
.