4.2 Fit a ETS model

The ets() function in the forecast package fits a simple exponential smoothing model.

Load the data.

load("landings.RData")

Fit the model.

fit <- forecast::ets(anchovy87ts, model="ANN")
fr <- forecast::forecast(fit, h=5)

model="ANN" specifies the simple exponential smoothing model.

plot(fr)

Look at the estimates

fit
## ETS(A,N,N) 
## 
## Call:
##  forecast::ets(y = anchovy87ts, model = "ANN") 
## 
##   Smoothing parameters:
##     alpha = 0.7065 
## 
##   Initial states:
##     l = 8.5553 
## 
##   sigma:  0.2166
## 
##       AIC      AICc       BIC 
##  6.764613  7.964613 10.298775

4.2.1 The weighting function

4.2.2 Decomposing your model fit

Sometimes you would like to see the smoothed level that the model estimated. You can see that with plot(fit) or autoplot(fit).

autoplot(fit)