Question
#Please Answer in Python Codeblock Question 3 - Model Estimation Part (a) Plot the auto-correlation function (ACF) to get an indication of what type of
#Please Answer in Python Codeblock
Question 3 - Model Estimation
Part (a)
Plot the auto-correlation function (ACF) to get an indication of what type of ARIMA model may apply to this dataset. Refer to the table below to determine which model is best.
Provide your model choice either in a text cell below or as comments in the code cell alongside your code for the ACF plot.
Shape | Indicated Model |
---|---|
Exponential, decay to zero | AR - Use PACF plot to identify order |
Alternating positive and negative, decaying to zero | AR - Use PACF plot to identify order |
One or more spikes, rest are essentially zero | MA - Order identified by where plot becomes zero |
Decay, starting after a few lags | ARMA |
All zero or close to zero | Data is essentially random |
High values at fixed intervals | Include seasonal autoregressive term / difference |
No decay to zero | The series is not stationary |
Part (b)
Plot the partial auto-correlation function (PACF). Based on the PACF plot and ACF plot, determine what values are likely best for p and q.
Question 2 Part (c) should have determined the best value for d. Fill in your answer for p, d, and q in this text cell:
p= YOUR_ANSWER_WITH_REASON
d= YOUR_ANSWER (reason provided in Question 2 Part (c))
q= YOUR_ANSWER_WITH_REASON
C) Given your determination of p, d, and q, fit an ARIMA model with those parameters using the entire time series as training data. Get the predicted values from the model (calling predict with d as the start value and including typ='levels' if d>0) and compute the mean squared error (MSE) between the predictions and the actual values.
In addition to printing the resulting MSE, plot the predictions alongside the actual values.
D)
To further assess the accuracy of the model, plot the residual errors of the model both as a histogram and as a scatterplot.
Based on these plots, are the residuals normally distributed? Are the mean and variance constant over time? Provide reasons with your answers. Include your answer either as a text cell or in-line comment.
E) Since the estimated parameters are not guaranteed to provide the best results, try fitting an ARIMA model with new parameters (different value for at least one of p, d, and q). Based on MSE, is your new model better or worse than your original in part (a)?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started