| data.frc | R Documentation |
Forecast all columns of a data frame or matrix of intermittent demand series with a single call.
data.frc(
data.in,
method = c("crost", "crost.ma", "tsb", "sexsm", "imapa", "auto"),
...
)
data.in |
Data frame with time series, one per column. This can also be a matrix or array with each column being a different time series. |
method |
Forecasting method: |
... |
Additional inputs passed to the forecasting functions, for example
|
With method="auto", series that cannot be classified, because they
have fewer than two non-zero values, are forecasted with SES.
A list containing:
frc.out |
Data frame containing the forecasts of all time series. |
out |
List with the output of the forecasting function for each series. To
access an element of all outputs use, for example,
|
lt.out |
Only when |
Nikolaos Kourentzes, nikolaos@kourentzes.com
crost, tsb, sexsm,
crost.ma, imapa, idclass.
set.seed(1)
dataset <- simID(5, 60, idi=1.5, cv2=0.5)
# SBA for all series
fit <- data.frc(dataset, method="crost", type="sba", h=6)
fit$frc.out
# Smoothing parameters of all series
sapply(fit$out, "[[", "weights")
# Automatic selection between Croston, SBA, and SES
data.frc(dataset, method="auto", h=6)$frc.out
# Quantiles of the demand over a lead time of 3 periods
data.frc(dataset, method="tsb", h=3, probs=c(0.9,0.95))$lt.out
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.