Skip to content

Commit

Permalink
Updated _freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Jan 28, 2025
1 parent 659ef1e commit 2b4ed7a
Show file tree
Hide file tree
Showing 351 changed files with 91 additions and 15,278 deletions.
10 changes: 3 additions & 7 deletions _freeze/assignments/A1/execute-results/html.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _freeze/assignments/A2/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "bb8bf65052c66fc11a3109b5150bf3bb",
"hash": "3603007ed6637ba4ae49ae900efdf387",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: Assignment 2\n---\n\n\n\nThis assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.\n\n```r\nlibrary(fpp3)\nget_my_data <- function(student_id) {\n set.seed(student_id)\n all_data <- readr::read_rds(\"https://bit.ly/monashretaildata\")\n while(TRUE) {\n retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1)) \n if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)\n }\n}\n# Replace the argument with your student ID\nretail <- get_my_data(12345678)\n```\n\n 1. Plot your time series using the `autoplot()` command. What do you learn from the plot?\n 2. Plot your time series using the `gg_season()` command. What do you learn from the plot?\n 3. Plot your time series using the `gg_subseries()` command. What do you learn from the plot?\n 4. Find an appropriate Box-Cox transformation for your data and explain why you have chosen the particular transformation parameter $\\lambda$.\n 5. Produce a plot of an STL decomposition of the transformed data. What do you learn from the plot?\n\nFor all plots, please use appropriate axis labels and titles.\n\nYou need to submit one Rmarkdown or Quarto file which implements all steps above.\n\nTo receive full marks, the Rmd or qmd file must compile without errors.\n\n\n\n<br><br><hr><b>Due: 24 March 2024</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=2034165 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"markdown": "---\ntitle: Assignment 2\n---\n\nThis assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.\n\n```r\nlibrary(fpp3)\nget_my_data <- function(student_id) {\n set.seed(student_id)\n all_data <- readr::read_rds(\"https://bit.ly/monashretaildata\")\n while(TRUE) {\n retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))\n if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)\n }\n}\n# Replace the argument with your student ID\nretail <- get_my_data(12345678)\n```\n\n1. Using a test set of 2019--2022, fit an ETS model chosen automatically, and three benchmark methods to the training data. Which gives the best forecasts on the test set, based on RMSE?\n2. Check the residuals from the best model using an ACF plot and a Ljung-Box test. Do the residuals appear to be white noise?\n3. Now use time-series cross-validation with a minimum sample size of 15 years, a step size of 1 year, and a forecast horizon of 5 years. Calculate the RMSE of the results. Does it change the conclusion you reach based on the test set?\n4. Which of these two methods of evaluating accuracy is more reliable? Why?\n\nSubmit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above.\n\nTo receive full marks, the `qmd` file must compile without errors.\n\n<br><br><hr><b>Due: 18 April 2025</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=3444031 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
4 changes: 2 additions & 2 deletions _freeze/assignments/A3/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "538e6ba454db3863f91e9294190b5e88",
"hash": "8f55790c60d47fa5f76f432acb9da54d",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: Assignment 3\n---\n\n\n\nThis assignment will use national population data from 1960 -- 2022. Each student will use a different time series, selected using their student ID number as follows.\n\n```r\nlibrary(fpp3)\n# Replace seed with your student ID\nset.seed(12345678)\npop <- readr::read_rds(\"https://bit.ly/monashpopulationdata\") |>\n filter(Country == sample(Country, 1))\n```\n\nPopulation should be modelled as a logarithm as it increases exponentially.\n\n1. Using a test set of 2018--2022, fit an ETS model chosen automatically, and three benchmark methods to the training data. Which gives the best forecasts on the test set, based on RMSE?\n2. Check the residuals from the best model using an ACF plot and a Ljung-Box test. Do the residuals appear to be white noise?\n3. Now use time-series cross-validation with a minimum sample size of 15 years, a step size of 1 year, and a forecast horizon of 5 years. Calculate the RMSE of the results. Does it change the conclusion you reach based on the test set?\n4. Which of these two methods of evaluating accuracy is more reliable? Why?\n\nSubmit an Rmd or qmd file which carries out the above analysis. You need to submit one file which implements all steps above.\n\nTo receive full marks, the Rmd or qmd file must compile without errors.\n\n\n\n<br><br><hr><b>Due: 14 April 2024</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=2034169 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"markdown": "---\ntitle: Assignment 3\n---\n\nThis assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.\n\n```r\nlibrary(fpp3)\nget_my_data <- function(student_id) {\n set.seed(student_id)\n all_data <- readr::read_rds(\"https://bit.ly/monashretaildata\")\n while(TRUE) {\n retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))\n if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)\n }\n}\n# Replace the argument with your student ID\nretail <- get_my_data(12345678)\n```\n\nUse a training set up to and including 2018.\n\n* What transformations (Box-Cox and/or differencing) would be required to make the data stationary? You should use a unit-root test as part of the discussion.\n* Use a plot of the ACF and PACF of the (possibly differenced) data to determine two plausible models for this data set.\n* Fit both models, along with an automatically chosen model, and produce forecasts for 2019--2022.\n* Which model is best based on AIC? Which model is best based on the test set RMSE? Which do you think is best to use for future forecasts? Why?\n* Check the residuals from your preferred model, using an ACF plot and a Ljung-Box test. Do the residuals appear to be white noise?\n\nSubmit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above.\n\n\n<br><br><hr><b>Due: 16 May 2025</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=3444032 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
17 changes: 0 additions & 17 deletions _freeze/assignments/A4/execute-results/html.json

This file was deleted.

8 changes: 3 additions & 5 deletions _freeze/assignments/Project/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"hash": "3584077e3d86d824f611499180adc520",
"hash": "d12847e1959878cc9a8c39b1eefa8900",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: Retail Project\n---\n\n\n\n\n**Objective:** To forecast a real time series using ETS and ARIMA models.\n\n**Data:** The data are monthly measures of retail trade volume in Australia, [obtained from the ABS](https://www.abs.gov.au/methodologies/retail-trade-australia-methodology/jan-2024). Each student will be use a different time series, selected using their student ID number as follows. This is the same series that you used in [Assignment 2](A2.qmd).\n\n```r\nlibrary(fpp3)\nget_my_data <- function(student_id) {\n set.seed(student_id)\n all_data <- readr::read_rds(\"https://bit.ly/monashretaildata\")\n while(TRUE) {\n retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))\n if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)\n }\n}\n# Replace the argument with your student ID\nretail <- get_my_data(12345678)\n```\n\n**Assignment value:** This assignment is worth 20% of the overall unit assessment.\n\n**Report:**\n\nYou should produce forecasts of the series using ETS and ARIMA models. Write a report in Rmarkdown or Quarto format of your analysis explaining carefully what you have done and why you have done it. Your report should include the following elements.\n\n* A discussion of the statistical features of the original data, including the effect of COVID-19 on your series. [4 marks]\n* Explanation of transformations and differencing used. You should use a unit-root test as part of the discussion. [5 marks]\n* A description of the methodology used to create a short-list of appropriate ARIMA models and ETS models. Include discussion of AIC values as well as results from applying the models to a test-set consisting of the last 24 months of the data provided. [6 marks]\n* Choose one ARIMA model and one ETS model based on this analysis and show parameter estimates, residual diagnostics, forecasts and prediction intervals for both models. Diagnostic checking for both models should include ACF graphs and the Ljung-Box test. [8 marks]\n* Comparison of the results from each of your preferred models. Which method do you think gives the better forecasts? Explain with reference to the test-set. [2 marks]\n* Apply your two chosen models to the full data set, re-estimating the parameters but not changing the model structure. Produce out-of-sample point forecasts and 80% prediction intervals for each model for two years past the end of the data provided. [4 marks]\n* Obtain up-to-date data from the [ABS website](https://www.abs.gov.au/statistics/industry/retail-and-wholesale-trade/retail-trade-australia) (Table 11). You may need to use the previous release of data, rather than the latest release. Compare your forecasts with the actual numbers. How well did you do? [5 marks]\n* A discussion of benefits and limitations of the models for your data. [3 marks]\n* Graphs should be properly labelled, including appropriate units of measurement. [3 marks]\n\n**Notes**\n\n* Your submission must include the Rmarkdown or Quarto file (.Rmd or .qmd), and should run without error.\n* There will be a 5 marks penalty if file does not run without error.\n* When using the updated ABS data set, do not edit the downloaded file in any way.\n* There is no need to provide the updated ABS data with your submission.\n\n\n\n\n<br><br><hr><b>Due: 24 May 2024</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=2034167 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"supporting": [
"Project_files"
],
"markdown": "---\ntitle: Retail Project\n---\n\n**Objective:** To forecast a real time series using ETS and ARIMA models.\n\n**Data:** The data are monthly measures of retail trade volume in Australia, [obtained from the ABS](https://www.abs.gov.au/methodologies/retail-trade-australia-methodology/jan-2024). Each student will be use a different time series, selected using their student ID number as follows. This is the same series that you used in previous assignments.\n\n```r\nlibrary(fpp3)\nget_my_data <- function(student_id) {\n set.seed(student_id)\n all_data <- readr::read_rds(\"https://bit.ly/monashretaildata\")\n while(TRUE) {\n retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))\n if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)\n }\n}\n# Replace the argument with your student ID\nretail <- get_my_data(12345678)\n```\n\n**Assignment value:** This assignment is worth 10% of the overall unit assessment. You may copy and paste material from previous assignments, but you must take into account any feedback that you have received on these assignments.\n\n**Report:**\n\nYou should produce forecasts of the series using ETS and ARIMA models. Write a report in Quarto format of your analysis explaining carefully what you have done and why you have done it. Your report should include the following elements.\n\n* Produce some plots of your series, and describe what you learn from each plot. [2 marks]\n* Discuss the statistical features of the data, including the effect of COVID-19 on your series. [2 marks]\n* Find an appropriate Box-Cox transformation for your data and explain why you have chosen the particular transformation parameter $\\lambda$.\n* Produce a plot of an STL decomposition of the transformed data. What do you learn from the plot?\n* What differencing would be required to make the data stationary? You should use a unit-root test as part of the discussion. [4 marks]\n* A description of the methodology used to create a short-list of appropriate ARIMA models and ETS models. Include discussion of AIC values as well as results from applying the models to a test-set consisting of the last 24 months of the data provided. [6 marks]\n* Choose one ARIMA model and one ETS model based on this analysis and show parameter estimates, residual diagnostics, forecasts and prediction intervals for both models. Diagnostic checking for both models should include ACF graphs and the Ljung-Box test. [8 marks]\n* Comparison of the results from each of your preferred models. Which method do you think gives the better forecasts? Explain with reference to the test-set. [2 marks]\n* Apply your two chosen models to the full data set, re-estimating the parameters but not changing the model structure. Produce out-of-sample point forecasts and 80% prediction intervals for each model for two years past the end of the data provided. [4 marks]\n* Obtain up-to-date data from the [ABS website](https://www.abs.gov.au/statistics/industry/retail-and-wholesale-trade/retail-trade-australia) (Table 11). You may need to use the previous release of data, rather than the latest release. Compare your forecasts with the actual numbers. How well did you do? [5 marks]\n* A discussion of benefits and limitations of the models for your data. [3 marks]\n* Graphs should be properly labelled, including appropriate units of measurement. [3 marks]\n\n**Notes**\n\n* Your submission must include the Quarto file (`.qmd`), and should run without error.\n* There will be a 5 marks penalty if file does not run without error.\n* When using the updated ABS data set, do not edit the downloaded file in any way.\n* There is no need to provide the updated ABS data with your submission.\n\n<br><br><hr><b>Due: 30 May 2025</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=3444033 class = 'badge badge-large badge-blue'><font size='+2'>&nbsp;&nbsp;<b>Submit</b>&nbsp;&nbsp;</font><br></a>\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
],
Expand Down
Loading

0 comments on commit 2b4ed7a

Please sign in to comment.