Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Econ 132 Problem Set 3

May 25, 2022

Instructions: Treat this problem set as a take home final exam. You are allowed to make
clarifications about the questions but you may not ask questions on how to answer the
problems. Answers may be completely typewritten. R codes and outputs may be copied and
pasted as pictures. Your plots should be properly labeled. Make sure that you submit HD
images. All solutions must be compiled and submitted as a single PDF file. Submit the log file
of your R session. Finalize your output before uploading to UVLé. Outputs may not be re-
submitted once uploaded to UVLé. Submissions beyond the deadline will still be accepted but
1 point will be deducted for each hour past due. Always observe academic honesty. Your
submissions may be chosen randomly for plagiarism checks.

To create a log file:

1. Set the working directory.


2. Start the log file using the sink function:
sink(“E132_PS3_Smith_A.log”, split=TRUE)
3. Run the following R code:
cat(readChar(rstudioapi::getSourceEditorContext()$path,
file.info(rstudioapi::getSourceEditorContext()$path)$size))
4. Run the following before implementing your codes:
Sys.info()
Sys.time()
5. When done, run the following codes:
Sys.time()
sink()

Filename format: E132_PS3_Smith_A.pdf

Deadline: June 1, 2022, 11:59 pm

Questions

1. The inf_ph.csv dataset contains monthly headline inflation of the Philippines from
January 2019 to April 2022.
a) Load the dataset in R. Call it “inf”.
b) Convert inf into a time series object. Call it “inf_ph”.
c) Plot inf_ph using autoplot. Describe the historical behavior of inflation.
d) Formally test for the stationarity of inf_ph. State your hypotheses and decision
properly.
e) Based on your result in 1d, perform the necessary transformation and testing to
make sure that the time series is stationary.
f) What is the order of integration of inf_ph?
g) Based on your answer in 1d, draw the correlograms (ACF and PACF) of the
stationary form of inf_ph.
h) Use the automatic ARIMA algorithm to model inf_ph. Call the model
“inf_ph_auto”.
i) What model does the automatic algorithm suggest? Write the model in terms of the
backshift operator. (See slide 44 of Lecture 8).
j) Test the significance of the coefficients of inf_ph_auto. State your hypotheses and
decision properly.
k) Check if the residuals of inf_ph_auto are:
i) white noise
ii) normally distributed
iii) homoskedastic
State your hypotheses and decision properly.
l) Generate a new time series for the fitted values of inf_ph_auto. Call it
“inf_ph_auto_fit”.
m) Plot the inf_ph and inf_ph_auto_fit together. What can you say about the fit of
the model?
2. Review your corellograms in 1g. Without using the automatic ARIMA algorithm, model
inflation as a purely non-seasonal AR(2) and purely non-seasonal MA(3) process. Call
the models inf_ph_AR and inf_ph_MA, respectively. For each model:
a) Test the significance of the coefficients.
b) Write the estimated equation.
c) Check if the residuals of the model are:
i) white noise
ii) normally distributed
iii) homoskedastic
d) Plot the inf_ph and fitted values together. What can you say about the fit of the
model?
State your hypotheses and decision properly.

3. Compare inf_ph_auto, inf_ph_AR, and inf_ph_MA in terms of accuracy and


information criteria. Summarize the measurements in a table. Which is the best performing
model among the three?

4. Based on your model of choice in No. 3, produce a forecast of monthly Philippine inflation
rates from May 2022 to December 2022.
a) Summarize your forecasts (with 95-percent prediction interval) in a table.
b) Plot the actual data and forecast values with prediction intervals.
c) What is the 95-percent interval forecast for May 2022?
Bonus question: Do you think this interval covers the actual inflation in May 2022?
d) What is the forecast average Philippine inflation rate for 2022?
e) Is the 2022 forecast within the official BSP inflation target of 2-4 percent for 2022?
f) Cite current local and international developments that may explain your result in 4e.

-END-

You might also like