-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add _freeze to speed up GA rendering
- Loading branch information
1 parent
6b31774
commit 5ddaa0b
Showing
352 changed files
with
15,697 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ | |
/site_libs/ | ||
*_cache | ||
*_files | ||
_freeze/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hash": "bb8bf65052c66fc11a3109b5150bf3bb", | ||
"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'> <b>Submit</b> </font><br></a>\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hash": "538e6ba454db3863f91e9294190b5e88", | ||
"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'> <b>Submit</b> </font><br></a>\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "3430e0210462804d1ee63dff11bdedc8", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: Assignment 4\n---\n\n\n\n## Background\n\nHere is a function that generates data from an AR(1) model starting with the first value set to 0\n\n```r\ngenerate_ar1 <- function(n = 100, c = 0, phi, sigma = 1) {\n # Generate errors\n error <- rnorm(n, mean = 0, sd = sigma)\n # Set up vector for the response with initial values set to 0\n y <- rep(0, n)\n # Generate remaining observations\n for(i in seq(2, length.out = n-1)) {\n y[i] <- c + phi * y[i-1] + error[i]\n }\n return(y)\n}\n```\n\nHere `n` is the number of observations to simulate, `c` is the constant, `phi` is the AR coefficient, and `sigma` is the standard deviation of the noise. The following example shows the function being used to generate 50 observations\n\n```r\nlibrary(fpp3)\ntsibble(time = 1:50, y = generate_ar1(n=50, c=1, phi=0.8), index = time) |>\n autoplot(y)\n```\n\n## Instructions\n\n<ol>\n<li> Modify the `generate_ar1` function to generate data from an ARIMA(p,0,q) model with parameters to be specified by the user. The first line of your function definition should be\n\n ```r\n generate_arma <- function(n = 100, c = 0, phi = NULL, theta = NULL, sigma = 1)\n ```\n\n Here `phi` and `theta` are vectors of AR and MA coefficients. Your function should return a numeric vector of length `n`.\n\n For example `generate_arma(n = 50, c = 2, phi = 0.4, theta = c(0.3, -0.6))` should return 50 observations generated from the ARIMA(1,0,2) model\n $$y_t = 2 + 0.4 y_{t-1} + 0.3\\varepsilon_{t-1} - 0.6\\varepsilon_{t-2} + \\varepsilon_t$$\n where $\\varepsilon \\sim N(0,1)$.\n\n<li> The noise should be generated using the `rnorm()` function.\n\n<li> Your function should check stationarity and invertibility conditions and return an error if either condition is not satisfied. You can use the `stop()` function to generate an error. The model will be stationary if the following expression returns `TRUE`:\n\n ```r\n !any(abs(polyroot(c(1,-phi))) <= 1)\n ```\n\n The MA parameters will be invertible if the following expression returns `TRUE`:\n\n ```r\n !any(abs(polyroot(c(1,theta))) <= 1)\n ```\n\n<li> The above function sets the first value of every series to 0. Your function should fix this problem by generating more observations than required and then discarding the first few observations. You will need to consider how many observations to discard, to prevent the returned series from being affected by the initial values.\n\n</ol>\n\nPlease submit your solution as a .R file.\n\n\n\n<br><br><hr><b>Due: 5 May 2024</b><br><a href=https://learning.monash.edu/mod/assign/view.php?id=2034170 class = 'badge badge-large badge-blue'><font size='+2'> <b>Submit</b> </font><br></a>\n\n\n\n---\n\n## Solution\n\n[R code](A4.R)\n", | ||
"supporting": [ | ||
"A4_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "3584077e3d86d824f611499180adc520", | ||
"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'> <b>Submit</b> </font><br></a>\n", | ||
"supporting": [ | ||
"Project_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"hash": "643dcf8bbb054b6ae424efc66287066f", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: \"ETC3550/5550 Applied forecasting\"\n---\n\n\n\n\n\n\n## Teaching team\n### Lecturer/Chief Examiner\n\n\n:::: {.columns}\n\n::: {.column width=\"25%\"}\n\n{style=\"width: 80%; border-radius: 50%;\"}\n:::\n\n::: {.column width=\"75%\"}\n\n[**Rob J Hyndman**](https://robjhyndman.com)\n\nEmail: [[email protected]](mailto:[email protected])\n\n:::\n\n::::\n\n### Head Tutor\n\n:::: {.columns}\n\n::: {.column width=\"25%\"}\n\n{style=\"width: 80%;border-radius: 50%;\"}\n:::\n\n::: {.column width=\"75%\"}\n\n[**Mitchell O'Hara-Wild**](https://mitchelloharawild.com)\n\nEmail: [[email protected]](mailto:[email protected])\n\n:::\n\n::::\n\n### Tutors\n\n* Elena Sanina\n* Zhixiang (Elvis) Yang\n* Jarryd Chapman\n* Xiefei (Sapphire) Li\n* Xiaoqian Wang\n\n## Weekly schedule\n\n* [Pre-recorded videos](https://www.youtube.com/watch?v=uwKiT1o1TkI&list=PLyCNZ_xXGzpm7W9jLqbIyBAiSO5jDwJeE): approximately 1 hour per week [[Slides](https://github.com/robjhyndman/fpp3_slides)]\n* Tutorials: 1.5 hours in class per week\n* Seminars: 9am Fridays, [Central 1 Lecture Theatre, 25 Exhibition Walk](https://maps.app.goo.gl/RKdmJq2tBfw8ViNT9).\n\n\n\n\n\n\n|Week |Topic |Chapter |Assessments |\n|:------|:-----------------------------------|:--------------------------------|:--------------|\n|26 Feb |[Introduction to forecasting and R](./week1/index.html)|[1. Getting started](https://OTexts.com/fpp3/intro.html)| |\n|04 Mar |[Time series graphics](./week2/index.html)|[2. Time series graphics](https://OTexts.com/fpp3/graphics.html)|[Assignment 1](assignments/A1.qmd)|\n|11 Mar |[Time series decomposition](./week3/index.html)|[3. Time series decomposition](https://OTexts.com/fpp3/decomposition.html)| |\n|18 Mar |[The forecaster's toolbox](./week4/index.html)|[5. The forecaster's toolbox](https://OTexts.com/fpp3/toolbox.html)|[Assignment 2](assignments/A2.qmd)|\n|25 Mar |[Exponential smoothing](./week5/index.html)|[8. Exponential smoothing](https://OTexts.com/fpp3/expsmooth.html)| |\n|01 Apr |Mid-semester break | | |\n|08 Apr |[Exponential smoothing](./week6/index.html)|[8. Exponential smoothing](https://OTexts.com/fpp3/expsmooth.html)|[Assignment 3](assignments/A3.qmd)|\n|15 Apr |[ARIMA models](./week7/index.html) |[9. ARIMA models](https://OTexts.com/fpp3/arima.html)| |\n|22 Apr |[ARIMA models](./week8/index.html) |[9. ARIMA models](https://OTexts.com/fpp3/arima.html)| |\n|29 Apr |[ARIMA models](./week9/index.html) |[9. ARIMA models](https://OTexts.com/fpp3/arima.html)|[Assignment 4](assignments/A4.qmd)|\n|06 May |[Multiple regression and forecasting](./week10/index.html)|[7. Time series regression models](https://OTexts.com/fpp3/regression.html)| |\n|13 May |[Dynamic regression](./week11/index.html)|[10. Dynamic regression models](https://OTexts.com/fpp3/dynamic.html)| |\n|20 May |[Dynamic regression](./week12/index.html)|[10. Dynamic regression models](https://OTexts.com/fpp3/dynamic.html)|[Retail Project](assignments/Project.qmd)|\n\n\n\n\n## Assessments\n\n* [Assignment 1](assignments/A1.qmd): 2%\n* [Assignment 2](assignments/A2.qmd): 6%\n* [Assignment 3](assignments/A3.qmd): 6%\n* [Assignment 4](assignments/A4.qmd): 6%\n* [Retail project](assignments/Project.qmd): 20%\n* Final exam: 60%\n\n## R package installation\n\nHere is the code to install the R packages we will be using in this unit.\n\n```r\ninstall.packages(c(\"tidyverse\",\"fpp3\", \"GGally\"), dependencies = TRUE)\n```\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.