
BATS model (Exponential smoothing state space model with Box-Cox transformation, ARMA errors, Trend and Seasonal components)
Source:R/bats.R
bats.RdFits a BATS model applied to y, as described in De Livera, Hyndman &
Snyder (2011). Parallel processing is used by default to speed up the
computations.
Usage
bats(
y,
use.box.cox = NULL,
use.trend = NULL,
use.damped.trend = NULL,
seasonal.periods = NULL,
use.arma.errors = TRUE,
use.parallel = length(y) > 1000,
num.cores = 2,
bc.lower = 0,
bc.upper = 1,
biasadj = FALSE,
model = NULL,
...
)Arguments
- y
The time series to be forecast. Can be
numeric,mstsorts. Only univariate time series are supported.- use.box.cox
TRUE/FALSEindicates whether to use the Box-Cox transformation or not. IfNULLthen both are tried and the best fit is selected by AIC.- use.trend
TRUE/FALSEindicates whether to include a trend or not. IfNULLthen both are tried and the best fit is selected by AIC.- use.damped.trend
TRUE/FALSEindicates whether to include a damping parameter in the trend or not. IfNULLthen both are tried and the best fit is selected by AIC.- seasonal.periods
If
yisnumeric, then seasonal periods can be specified with this parameter.- use.arma.errors
TRUE/FALSEindicates whether to include ARMA errors or not. IfTRUEthe best fit is selected by AIC. IfFALSEthen the selection algorithm does not consider ARMA errors.- use.parallel
TRUE/FALSEindicates whether or not to use parallel processing.- num.cores
The number of parallel processes to be used if using parallel processing. If
NULLthen the number of logical cores is detected and all available cores are used.- bc.lower
The lower limit (inclusive) for the Box-Cox transformation.
- bc.upper
The upper limit (inclusive) for the Box-Cox transformation.
- biasadj
Use adjusted back-transformed mean for Box-Cox transformations. If transformed data is used to produce forecasts and fitted values, a regular back transformation will result in median forecasts. If biasadj is
TRUE, an adjustment will be made to produce mean forecasts and fitted values.- model
Output from a previous call to
bats. If model is passed, this same model is fitted toywithout re-estimating any parameters.- ...
Additional arguments to be passed to
auto.arimawhen choose an ARMA(p, q) model for the errors. (Note that xreg will be ignored, as will any arguments concerning seasonality and differencing, but arguments controlling the values of p and q will be used.)
Value
An object of class bats. The generic accessor functions
fitted.values and residuals extract useful features of the
value returned by bats and associated functions. The fitted model is
designated BATS(omega, p,q, phi, m1,...mJ) where omega is the Box-Cox
parameter and phi is the damping parameter; the error is modelled as an
ARMA(p,q) process and m1,...,mJ list the seasonal periods used in the model.