TSB intermittent demand method with fixed or optimised parameters.
tsb(data,h=10,w=NULL,init=c("mean","naive"),
cost=c("mar","msr","mae","mse"),
init.opt=c(TRUE,FALSE),outplot=c(FALSE,TRUE),
opt.on=c(FALSE,TRUE),na.rm=c(FALSE,TRUE))
Type of model fitted.
In-sample demand rate.
Out-of-sample demand rate.
Smoothing parameters for demand and demand probability.
Initialisation values for demand and demand probability smoothing.
Intermittent demand time series.
Forecast horizon.
Smoothing parameters. If w == NULL then parameters are optimised. Otherwise first parameter is for demand and second for demand probability.
Initial values for demand and intervals. This can be: 1. c(z,x) - Vector of two scalars, where first is initial demand and second is initial interval; 2. "naive" - Initial demand is first non-zero demand and initial demand probability is again the first one; 3. "mean" - Same as "naive", but initial demand probability is the mean of all in sample probabilities.
Cost function used for optimisation: 1. "mar" - Mean Absolute Rate; 2. "msr" - Mean Squared Rate; 3. "mae" - Mean Absolute Error; 4. "mse" - Mean Squared Error.
If init.opt==TRUE then initial values are optimised.
If TRUE a plot of the forecast is provided.
This is meant to use only by the optimisation function. When opt.on is TRUE then no checks on inputs are performed.
A logical value indicating whether NA values should be remove using the method.
Nikolaos Kourentzes
Optimisation of the method described in: N. Kourentzes, 2014, On intermittent demand model optimisation and selection, International Journal of Production Economics, 156: 180-190. tools:::Rd_expr_doi("10.1016/j.ijpe.2014.06.007").
crost
, sexsm
, crost.ma
.