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.
minimumAL
Lowest aggregation level to use. Default = 1.
maximumAL
Highest aggregation level to use. Default = maximum interval.
comb
Combination operator. One of "mean" or "median". Default is "mean".
init.opt
If init.opt==TRUE then Croston and SBA initial values are optimised.
paral
Use parallel processing. 0 = no; 1 = yes (requires initialised cluster); 2 = yes and initialise cluster. Default is 0.
outplot
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.
model.fit
Optional input with model types and parameters. This is the model.fit output from this function. If used it overrides other model settings.
na.rm
A logical value indicating whether NA values should be remove using the method.
Value
frc.in
In-sample demand rate.
frc.out
Out-of-sample demand rate.
summary
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.
model.fit
Parameters and initialisation values of fitted model in each aggregation level.
Note
Note on optimal model paramaters: This implementation of MAPA for intermittent demand data optimises smoothing parameters for all Croston's method, SBA and SES. Optimisation is based on:
N. Kourentzes, 2014, On intermittent demand model optimisation and selection, International Journal of Production Economics, 156: 180-190. http://dx.doi.org/10.1016/j.ijpe.2014.06.007.
Note on parallelisation: Option paral=2 incurs substantial overheads. For a single time series using no parallelisation seems to be as good. If imapa is to be applied on multiple series, then initialising the parallel cluster externally and using the option paral=1 is advised.