File: tbats.Rd

package info (click to toggle)
r-cran-forecast 8.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,248 kB
  • sloc: cpp: 975; ansic: 648; sh: 13; makefile: 2
file content (110 lines) | stat: -rw-r--r-- 3,845 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbats.R
\name{tbats}
\alias{tbats}
\alias{as.character.tbats}
\alias{print.tbats}
\title{TBATS model (Exponential smoothing state space model with Box-Cox
transformation, ARMA errors, Trend and Seasonal components)}
\usage{
tbats(
  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{
\item{y}{The time series to be forecast. Can be \code{numeric}, \code{msts}
or \code{ts}. Only univariate time series are supported.}

\item{use.box.cox}{\code{TRUE/FALSE} indicates whether to use the Box-Cox
transformation or not. If \code{NULL} then both are tried and the best fit
is selected by AIC.}

\item{use.trend}{\code{TRUE/FALSE} indicates whether to include a trend or
not. If \code{NULL} then both are tried and the best fit is selected by AIC.}

\item{use.damped.trend}{\code{TRUE/FALSE} indicates whether to include a
damping parameter in the trend or not. If \code{NULL} then both are tried
and the best fit is selected by AIC.}

\item{seasonal.periods}{If \code{y} is \code{numeric} then seasonal periods
can be specified with this parameter.}

\item{use.arma.errors}{\code{TRUE/FALSE} indicates whether to include ARMA
errors or not. If \code{TRUE} the best fit is selected by AIC. If
\code{FALSE} then the selection algorithm does not consider ARMA errors.}

\item{use.parallel}{\code{TRUE/FALSE} indicates whether or not to use
parallel processing.}

\item{num.cores}{The number of parallel processes to be used if using
parallel processing. If \code{NULL} then the number of logical cores is
detected and all available cores are used.}

\item{bc.lower}{The lower limit (inclusive) for the Box-Cox transformation.}

\item{bc.upper}{The upper limit (inclusive) for the Box-Cox transformation.}

\item{biasadj}{Use adjusted back-transformed mean for Box-Cox
transformations. If TRUE, point forecasts and fitted values are mean
forecast. Otherwise, these points can be considered the median of the
forecast densities.}

\item{model}{Output from a previous call to \code{tbats}. If model is
passed, this same model is fitted to \code{y} without re-estimating any
parameters.}

\item{...}{Additional arguments to be passed to \code{auto.arima} when
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 with class \code{c("tbats", "bats")}. The generic accessor
functions \code{fitted.values} and \code{residuals} extract useful features
of the value returned by \code{bats} and associated functions. The fitted
model is designated TBATS(omega, p,q, phi, <m1,k1>,...,<mJ,kJ>) 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 and k1,...,kJ are the corresponding number of Fourier
terms used for each seasonality.
}
\description{
Fits a TBATS model applied to \code{y}, as described in De Livera, Hyndman &
Snyder (2011). Parallel processing is used by default to speed up the
computations.
}
\examples{

\dontrun{
fit <- tbats(USAccDeaths)
plot(forecast(fit))

taylor.fit <- tbats(taylor)
plot(forecast(taylor.fit))}

}
\references{
De Livera, A.M., Hyndman, R.J., & Snyder, R. D. (2011),
Forecasting time series with complex seasonal patterns using exponential
smoothing, \emph{Journal of the American Statistical Association},
\bold{106}(496), 1513-1527.
}
\seealso{
\code{\link{tbats.components}}.
}
\author{
Slava Razbash and Rob J Hyndman
}
\keyword{ts}