Assignment 1
This assignment will use the same data that you will use in the retail project later in the semester. Each student will use a different time series, selected using their student ID number as follows.
library(fpp3)
<- function(student_id) {
get_my_data set.seed(student_id)
<- readr::read_rds("https://bit.ly/monashretaildata")
all_data while(TRUE) {
<- filter(all_data, `Series ID` == sample(`Series ID`, 1))
retail if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)
}
}# Replace the argument with your student ID
<- get_my_data(12345678) retail
- Plot your time series using the
autoplot()
command. What do you learn from the plot? [1 mark] - Plot your time series using the
gg_season()
command. What do you learn from the plot? [1 mark] - Plot your time series using the
gg_subseries()
command. What do you learn from the plot? [1 mark] - Find an appropriate Box-Cox transformation for your data and explain why you have chosen the particular transformation parameter \lambda. [1.5 marks]
- Produce a plot of an STL decomposition of the transformed data. What do you learn from the plot? [1.5 marks]
For all plots, please use appropriate axis labels and titles.
You need to submit one Quarto (qmd
) file which implements all steps above. You may use this file as a starting point.
To receive full marks, the qmd
file must compile without errors.
Due: 28 March 2025
Submit