Assignment 2
STAT317/ECON323
Due 5pm Tuesday, 14 September 2021
A reminder that graphs help in interpretation and explanation and you are expected to present them properly.
1 Question 1 – 9 Marks
a Using one of the time series options from assignment #1 – you can use
the same one or a different one – do the decomposition of the time series
using the stl command. Comment on the the three components. Assignment Project Exam Help
b Using stl command specify t.window = 5. How are your graphical out- puts different? Why (hint: what does t.window option do)?
c Using the same command as for part a. do the decomposition of the https://tutorcs.com
logged series using the stl command. Comment on the the three com- ponents. Are the shape or characteristics – the values of course will be different – of any of the three components different from those from the
WeChat: cstutorcs
previous decomposition? Or do they look similar? Explain why a compo-
nent differs or remains the similar.
d From the two decompositions would you model the whole series or just part? Justify you conclusions.
Computer Science Tutoring
2 Question 2 – 16 Marks
Using the same time series you are asked to do a time series regression. You can use either the lm() function or the tslm() function from the forecast package (recommended).
a Fit the simple regression model yt = β0 + β1t + εt, t = 1,…,N to this data. From your outputs write the fitted model yt = βˆ0 + βˆ1t + εt with values for the parameters and residuals.
b Using various graphical displays of the residuals (e.g. time series, ACF, Normal Distribution) show and explain why the residuals are what you would expect from a fitted time series model.
c Fit the regression model yt = β0 + β1t + 11 δjDjt + εt, where Djt is j=1
the estimate for seasonal dummy for months j = 1, 2, . . . , 11. Again from your outputs write the fitted model yt = βˆ0 + βˆ1t + 11 δjDˆjt + εt.
j=1 d What is your estimate for Dˆ12t? Show your working.
e Compare the graphs of residuals from this model to those from the pre-
Assignment Project Exam Help
vious model. What are the differences, if any, and explain why this is
f Fit the regression model log(yt) = β0 +β1t+11 δjDjt +εt, where Djt is
the seasonal dummy for months J = 1, 2, . . . , 11. Again from your outputs
your estimate for Dˆ12t.
t 0 1 j=1jjt t
WeChat: cstutorcs
δD +ε alongwith g Compare the residuals from this model to those from the previous two
models. What are the differences, if any, and explain why this is so?
Code Help, Add WeChat: cstutorcs