STA 364 Spring 2025

Take-Home Final Exam

Due: Wednesday, February 5th, at 12 pm.

Rules

  1. Your solutions must be written up in a Quarto (qmd) file and then rendered into an HTML file called exam-02_LAST_NAME.html. This file must include your code, output, and write-up for each question. When showing extensive table results, please use the head() function if it is over 20 rows.
Note

You may add additional code chunks to the template provided, but don’t forget to change the chunk labels.

  1. You can use the course book, your notes, and some of the internet for this exam. You cannot ask AI or people about the exam. Anything you use that is not included in the book or notes must be cited. You may not consult with anyone other than the Professor about this exam. You cannot ask direct questions online or consult with each other, not even for hypothetical questions.

  2. You will be required to upload the HTML file from your output. Technical difficulties are not an excuse for late work—do not wait until the last minute. Before uploading to Moodle, verify that your HTML file includes all graphs and tables. Use the embedded resources option in the YAML provided at the top of your template document.

  3. Your analysis, outputs, and narratives should answer the questions, not your code.

Submission

When you are finished with your exam, be sure to Render the final document. Once rendered, you can download your file by:

  • Finding the .html file in your File pane (on the bottom right of the screen)
  • Click the check box next to the file.
  • Click the blue gear above and then click “Export” to download
  • Submit your final HTML document to the exam spot on Moodle

Code Bank

A code bank is provided to assist you during your exam. You can find the code bank at HERE.

Exam

Setup

library(fpp3)

Data

old_ny_childcare <- ny_childcare |> filter(year(Month)<2020)

The data is found in the ffp3 package and is called ny_childcare. It shows the number of employees (in thousands) in child day care services in New York City from January 1990 to April 2024. See ?ny_childcare for more information. We are only working with data through 2019, named old_ny_childcare.

Tip

Make sure to consider transformed models in addition to other models.

Questions

  1. Using appropriate plots, discuss which ETS models might be best and why. Match the components (E,T,S) and their functional form (Additive, Multiplicative) with what you see in your plots.

  2. Using appropriate plots, discuss which ARIMA, or SARIMA models might be best. References specific plots and be specific.

  3. Fit all appropriate models, including those you just mentioned; we have covered during the course using a training and testing approach, holding the last 2 years for testing.

  4. Compare all models using multiple accuracy metrics on the training and testing set and visualize their forecasts on the testing set (and the whole series). Pick the best 2.

  5. Assess the quality of the two chosen models and select the best overall model.

  6. Using the best model, refit that type of model on the complete data and provide forecasts (plot) for 2020. Do you think your forecast is accurate? Why or why not?