Time Series Homework: Chapter 3 Lesson 3 Key

Please_put_your_name_here

Data

unratensa <- rio::import("https://byuistats.github.io/timeseries/data/UNRATENSA.csv")

Questions

Question 1 - US Unemployment Rate: Additive Holt-Winters Forecasting (30 points)

We have used a measure of US unemployment rates before. This series imported above has not been seasonally adjusted.

a) Please use the Holt-Winters smoothing method to the series.
Answer
unemp_ts <- unratensa |>
  mutate(date = yearmonth(mdy(date))) |>
  as_tsibble(index = date)


unemp_hw <- unemp_ts |>
  tsibble::fill_gaps() |>
  model(Additive = ETS(unratensa ~
                         trend("A", alpha = 0.001, beta = 0.00008) +
                         error("A") +
                         season("A", gamma = 0.03),
                       opt_crit = "amse", nmse = 1))
report(unemp_hw)
Series: unratensa 
Model: ETS(A,A,A) 
  Smoothing parameters:
    alpha = 0.001 
    beta  = 8e-05 
    gamma = 0.03 

  Initial states:
     l[0]       b[0]       s[0]      s[-1]      s[-2]      s[-3]     s[-4]
 3.564225 0.01085215 -0.2496829 -0.3626345 -0.6233813 -0.3020714 -0.347254
      s[-5]     s[-6]      s[-7]       s[-8]     s[-9]    s[-10]    s[-11]
 0.06089356 0.2245134 -0.4234424 -0.05207845 0.5209291 0.6545514 0.8996575

  sigma^2:  3.1644

     AIC     AICc      BIC 
6849.132 6849.627 6915.794 
autoplot(components(unemp_hw))
Warning: Removed 12 rows containing missing values or values outside the scale range
(`geom_line()`).

augment(unemp_hw) |>
    ggplot(aes(x = date, y = unratensa)) +
    geom_line(aes(color = "Original")) +
    geom_line(aes(y = .fitted, color = "Fitted")) +
  theme_bw()+
  scale_color_manual(values = c("Original" = "black", "Fitted" = "coral1")) +
    labs(x = "Year",
         y = "Unepmloyment Rate (%)",
         color = "",
         title = "Original Series with Holt-Winters Model")+
  theme(legend.position = "bottom")

b) What parameters values did you choose for \(\alpha\), \(\beta\), and \(\gamma\). Justify your choice.
Answer

There should be no long term trend to unemployment as it should fluctuate around a natural rate. Because of this we chose a \(\beta\) that is close to zero (0.00008) . However unemployment data does have some seasonality due to holiday hiring and college students looking for a job right after graduation. However the seasonality shouldn’t adjust much over time so we will chose a \(\gamma\) of 0.03. An \(\alpha\) of 0.001 was chosen as that level doesn’t change often and therefore should rely more on the historical data. Much of the fluctuations for this series comes from randomness and cycles.

c) Please plot the Holt-Winters forecast of the series for the next 24 months superimposed against the original series. Please see Figure 7 in Chapter 3: Lesson 3
Answer
unemp_hw |>
  forecast(h = "24 months") |> 
  autoplot(unemp_ts, level = 95) + 
  geom_line(aes(y = .fitted, color = "Fitted"),
    data = augment(unemp_hw)) +
  scale_color_discrete(name = "") +
  theme_bw() +
    labs(x = "Year",
         y = "Unepmloyment Rate (%)",
         color = "",
         title = "Original Series with Forecast")+
  theme(legend.position = "bottom")

Question 2 - Additive Holt-Winters Forecasting: Evaluation (20 points)

a) The Unemployment Rate data stops at the end of 2019. Please access the latest data HERE. Please don’t look at it until you have reached this point in the homework. Compare your forecasting work with with the actual realization of the series. What lessons about forecasting can you learn from the occurrence of Gray Rhino events like a pandemic?
Answer

The forecasted unemployment rates for 2020 and 2021 anticipated stability, but COVID-19 caused actual rates to surge, diverging sharply from predictions. This highlights the grey rhino effect—a high-impact, foreseeable event often underestimated in risk assessment. While the pandemic’s risks were known, they were largely ignored in routine forecasts, underscoring a key limitation: standard models often fail to account for foreseeable shocks. This gap between forecasted and actual values emphasizes the need for forecasting frameworks to integrate “grey rhino” scenarios to better prepare for major, probable risks.

Rubric

Criteria Mastery (10) Incomplete (0)
Question 1a: HW Smoothing Demonstrate the implementation of the Holt-Winters smoothing method in R, providing well-commented code that clearly explains each step of the algorithm. They correctly specify the necessary parameters, including trend and seasonality components. Students encounter difficulties in accurately implementing the Holt-Winters smoothing method in R. Their code may lack sufficient comments or clarity, making it challenging to understand the implementation process. Additionally, they may overlook important parameters or make errors in the application of the method, leading to inaccuracies in the results.
Mastery (10) Incomplete (0)
Question 1b: Parameter Choice Responses not only specify the chosen parameter values for $\alpha$, $\beta$, and $\gamma$ in the context of the Holt-Winters smoothing method but also correctly identify the purpose of each parameter in their explanation. They provide a thorough justification for each parameter choice, considering factors such as the data characteristics, seasonality patterns, and the desired level of smoothing Student struggles to clearly specify the chosen parameter values for $\alpha$, $\beta$, and $\gamma$. It’s no clear that they understand the purpose of each parameter in their explanation. They may provide limited or vague justification for each parameter choice, lacking consideration of important factors such as data characteristics or seasonality patterns.
Mastery (10) Incomplete (0)
Question 1c: Forecast Plot Responses effectively create a plot of the Holt-Winters forecast for the next 24 months superimposed against the original series in R. The forecasted values align with the original series and display relevant trends and seasonality patterns. Additionally, they appropriately label the axes, title the plot, and provide a clear legend to distinguish between the original series and the forecast. The plot closely resembles Figure 7 in the Time Series Notebook Student encounter challenges in creating a plot of the Holt-Winters forecast. They may struggle with accurately implementing the plotting code, resulting in inaccuracies or inconsistencies in the plotted forecast. Additionally, their plot may lack proper labeling of the axes, a title, or a legend, making it difficult to interpret the information presented. Furthermore, their plot may deviate significantly from Figure 7 in the Time Series Notebook.
Mastery (20) Incomplete (0)
Question 1a: Gray Rhinos Students provide a comparison between their forecasting results and the actual realization of the series, highlighting areas of accuracy and any discrepancies observed. They demonstrate an understanding of the impact of Gray Rhino event on forecasting. Responses are clear, coherent, and well-structured, ensuring that the evaluation and lessons learned are effectively communicated Submissions provide a limited or superficial comparison between their forecasting results and the actual realization of the series, lacking depth in their analysis or failing to identify key discrepancies.Responses demonstrate a lack of understanding of the impact of Gray Rhino events on forecasting. Explanations may lack clarity, coherence, or structure, making it difficult to understand the evaluation and lessons learned effectively.
Total Points 50