The smoothing parameters in an ETS model are \(\alpha\), \(\beta\), \(\gamma\), and \(\phi\). Error can be A or M, Trend can be A, Ad, M, or N (none), and Seasonality can be A, M, or N
\(\alpha\) is the level parameter that controls how the estimated level adjusts after each observation. The closer \(\alpha\) is to 1, the more weight is given to recent data points.
\(\beta\) is the trend parameter that controls how the slope adjusts after each observation. The higher \(\beta\) is, the faster the trend grows.
\(\gamma\) is the seasonal parameter that controls the updating of the seasonal factors. As y grows, the seasonality changes rapidly.
\(\phi\) is the dampening parameter (Ad in trend). This controls the trend so that it doesn’t reach infinity. As \(\phi\) gets smaller, the dampening increases, i.e the trend flattens.
Part 2:
library(fpp3)
Warning: package 'fpp3' was built under R version 4.5.2
Registered S3 method overwritten by 'tsibble':
method from
as_tibble.grouped_df dplyr
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ tsibble::interval() masks lubridate::interval()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Loading required package: xts
Loading required package: zoo
Attaching package: 'zoo'
The following object is masked from 'package:tsibble':
index
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
######################### Warning from 'xts' package ##########################
# #
# The dplyr lag() function breaks how base R's lag() function is supposed to #
# work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or #
# source() into this session won't work correctly. #
# #
# Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
# conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop #
# dplyr from breaking base R's lag() function. #
# #
# Code in packages is not affected. It's protected by R's namespace mechanism #
# Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning. #
# #
###############################################################################
Attaching package: 'xts'
The following objects are masked from 'package:dplyr':
first, last
Loading required package: TTR
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Plot variable not specified, automatically selected `.vars = value`
Looking at CPI, there is a steady upward trend with low seasonality and no dampening. \(\alpha=0.8\), \(\beta=0.1\), \(\gamma=.05\). Not much dampening, so \(\phi\) should be close to 1
For retail sales, there is far stronger seasonality, but a slightly more varying level. \(\alpha=0.8\), \(\beta=0.1\), \(\gamma=.25\). Not much dampening, so \(\phi\) should be close to 1
For CPI, \(\alpha\) is almost 1. I wouldn’t say it’s surprising since inflation prices are always based closely on the most recent price, but being that high means it’s basically ignoring historical prices> prices are basically just based on the last observation. I was very close to \(\beta\) since the trend doesn’t vary much. \(\gamma\) was also not far away, but I would’ve guessed slightly more seasonality than .001. As expected, \(\phi\) was close to 1.
For Retail sales, \(\alpha\) is basically 1. I wouldn’t say it’s surprising for the same reason as inflation (both are price-based). The big shock came in that there is no seasonality in the data. I would’ve expected some since spending increases in Q4 and dampens in the early months of the year.
Interestingly, when I plug the initial state that R gave me into Excel, it gives me alpha of 0.697 rather than 0.998. I ran this multiple times with different starting states and alphas. It always converged to around 0.7. I checked this with manual plugging of alpha, and it showed that 0.7 was the minimum SSE.