STAT603留学生讲解、R程序语言调试、讲解R、辅导SECMS

- 首页 >> 其他
AUT University
School of Engineering, Computer and Mathematical Sciences
STAT603: Forecasting
Assignment 1
The purpose of this assignment is to assess your analytical and computing
skills on the material covered.
Total Possible Marks: 30 marks, which contribute 15% towards your final
grade in this paper.
Deadline: 5pm, Monday, April 1, 2019
Submission: The assignment must be submitted as a soft copy in a single
.pdf file including signed SECMS or DCT assignment cover sheet (otherwise
your assignment won’t be marked). Your filename must include 1) your lastname,
2) your firstname, and 3) your student id, e.g., if John White submits
his assignment, his .pdf file must be named ”White John 123456789”. Submission
channel will be announced later.
Report/Assignment: Your assignment must be self-contained, i.e., you
need to embed your R code in your answers. See example in the box below:
1Page Limit: Maximum number of pages is 10 including graphs and R code.
Data:
Quarterly total beer available for consumption (million litres) in New
Zealand from Quarter 1, 2010 to Quarter 4, 2018
(Filename: NZ_TotalBeer_Quarterly.xlsx)
Quarterly average nation-wide temperature (degrees celcius) in New
Zealand from Quarter 1, 2010 to Quarter 4, 2018
(Filename: NZ_AvgTemp_Quarterly.xlsx)
Quarterly real national disposable income (Billion NZ dollars) in New
Zealand from Quarter 1, 2010 to Quarter 3, 2018
(Filename: NZ_DispIncome_Quarterly.xlsx)
Note: All data should be converted into time series using ts function
in R.
R: All computing tasks must be done using R or RStudio.
Plagiarism: If this is the case for your assignment, your case will
be referred to an appropriate university’s office.
Tasks/Questions:
1. Use the quarterly total beer available for consumption data. (17 marks)
(a) Plot the series and discuss the main features of the data. (2 marks)
(b) Discuss whether a transformation is needed. If yes, do so and
describe the effect. (3 marks)
(c) Find and discuss whether the autocorrelation exists in this time
series. (2 marks)
(d) Compute two years of forecasts (i.e. holding the last two years of
data out as the test set) using the four methods: (1) mean, (2)
naive, (3) seasonal naive, and (4) drift. Plot the series and the
forecasts, and discuss the results. (8 marks)
(e) Compare the root mean squared error (RMSE) of forecasts from
the four methods in (d). Which method do you think is best for
this time series? (2 marks)
22. Time series regression models (13 marks)
(a) Fit a regression model to the quarterly total beer available for consumption
data with a linear trend and seasonal dummies. Discuss
the results. (2 marks)
(b) Plot the quarterly total beer available for consumption data with
the quarterly average nation-wide temperature and real national
disposable income data. Perform the correlation analysis and discuss
the results. (3 marks)
(c) Fit a regression model to the quarterly total beer available for
consumption data with the quarterly average nation-wide temperature
and real national disposable income data as the explanatory
variables. Discuss the results. (2 marks)
(d) Do we need to include the linear trend and seasonal dummies
in the regression model in (c)? Perform a relevant analysis and
discuss the results. (3 marks)
(e) Compute two year of forecasts for the regression models in (a)
and (c). Evaluate the forecast accuracy and compare with those
in Question 1 parts (d)-(e). (3 marks)
3