```
Winters(x, period = NULL, trend = 2, lead = 0, plot = TRUE,
seasonal = c("additive", "multiplicative"), damped = FALSE, alpha = 0.2,
beta = 0.1057, gamma = 0.07168, phi = 0.98, a.start = NA,
b.start = NA, c.start = NA)
```

x

a univariate time series.

period

seasonal period. The default is

`NULL`

.trend

the type of trend component, can be one of 1,2,3 which represents constant,
linear and quadratic trend, respectively. The default is

`trend = 2`

.lead

the number of steps ahead for which prediction is required.
The default is

`0`

.plot

a logical value indicating to display the smoothed graph. The default is

`TRUE`

.seasonal

character string to select an "

`additive`

" or "`multiplicative`

"
seasonal model. The default is "`additive`

".damped

a logical value indicating to include the damped trend, only valid for

`trend = 2`

. The default is `FALSE`

.alpha

the parameter of level smoothing. The default is

`0.2`

.beta

the parameter of trend smoothing. The default is

`0.1057`

.gamma

the parameter of season smoothing. The default is

`0.07168`

.phi

the parameter of damped trend smoothing, only valid for

`damped = TRUE`

.
The default is `0.98`

.a.start

the starting value for level smoothing. The default is

`NA`

.b.start

the starting value for trend smoothing. The default is

`NA`

.c.start

the starting value for season smoothing. The default is

`NA`

.- A list with class "
`Winters`

" containing the following components: season the seasonal factors. estimate the smoothed values. pred the prediction, only available with `lead`

> 0.accurate the accurate measurements.

`HoltWinters`

in
`stats`

package but may be in different perspective. To be precise, it uses the
updating equations similar to exponential
smoothing to fit the parameters for the following models when
`seasonal = "additive"`

.
If the trend is constant (`trend = 1`

):
$$x[t] = a[t] + s[t] + e[t].$$
If the trend is linear (`trend = 2`

):
$$x[t] = (a[t] + b[t]*t) + s[t] + e[t].$$
If the trend is quadratic (`trend = 3`

):
$$x[t] = (a[t] + b[t]*t + c[t]*t^2) + s[t] + e[t].$$
Here $a[t],b[t],c[t]$ are the trend parameters, $s[t]$ is the seasonal
parameter for the
season corresponding to time $t$.
For the multiplicative season, the models are as follows.
If the trend is constant (`trend = 1`

):
$$x[t] = a[t] * s[t] + e[t].$$
If the trend is linear (`trend = 2`

):
$$x[t] = (a[t] + b[t]*t) * s[t] + e[t].$$
If the trend is quadratic (`trend = 3`

):
$$x[t] = (a[t] + b[t]*t + c[t]*t^2) * s[t] + e[t].$$
When `seasonal = "multiplicative"`

, the updating equations for each parameter can
be seen in page 606-607 of PROC FORECAST document of SAS. Similarly, for the
additive seasonal model, the 'division' (/) for $a[t]$ and $s[t]$ in page 606-607
is changed to 'minus' (-).The default starting values for $a,b,c$ are computed by a time-trend regression over
the first cycle of time series. The default starting values for the seasonal factors are
computed from seasonal averages. The default smoothing parameters (weights) ```
alpha,
beta, gamma
```

are taken from the equation `1 - 0.8^{1/trend}`

respectively. You can
also use the `HoltWinters`

function to get the optimal smoothing parameters
and plug them back in this function.

The prediction equation is $x[t+h] = (a[t] + b[t]*t)*s[t+h]$ for `trend = 2`

and
`seasonal = "additive"`

. Similar equations can be derived for the other options. When
the `damped = TRUE`

, the prediction equation is
$x[t+h] = (a[t] + (\phi + ... + \phi^(h))*b[t]*t)*s[t+h]$. More details can be
referred to R. J. Hyndman and G. Athanasopoulos (2013).

R. J. Hyndman and G. Athanasopoulos, "Forecasting: principles and practice," 2013.
[Online]. Available:

`HoltWinters`

, `Holt`

, `expsmooth`

Winters(co2) Winters(AirPassengers, seasonal = "multiplicative")