Homework_11

docx

School

University of Minnesota-Twin Cities *

*We aren’t endorsed by this school

Course

3032

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

8

Uploaded by JudgeOxide10008

Report
STAT 3032 Regression and Correlated Data Homework 11 Please show your work on each problem for full credit. A correct answer, unsupported by the necessary explanation , R code, or output will receive very little if any credit. Your work needs to be organized in a reasonably neat and coherent way and submitted as a pdf file on Canvas. Please do not share this handout outside the class. Problem 1 In this problem, we consider the analysis of the GNP data, quarterly U.S. GNP from 1947(1) to 2002(3), n = 223 observations. The data are real U.S. gross national product in billions of chained 1996 dollars and have been seasonally adjusted. The data is in the R package astsa 1. [1pts] Use the code below to plot this time series. Is it stationary? Explain install.packages("astsa") library(astsa) plot.ts(gnp) This time series is not stationary because the mean of the Yt (gnp) has a positive trend regard of t instead of remaining constant. 2. [1pts] When reports of GNP and similar economic indicators are given, it is often in growth rate (percent change) rather than in actual (or adjusted) values that is of interest. The growth rate, say, gnpgr t = log( gnp t + 1 ) log( gnp t )
STAT 3032 Regression and Correlated Data gnpgr t = t t quartely growth rate gnp t + 1 = ( t + 1 ) t quarterly U.S. GNP Let us represent the growth rate in R by the following variable: gnpgr = diff(log(gnp)) Plot the series the quarterly growth rate in R. Is this time series stationary? Make sure that you show the relevant R code and output. gnpgr = diff(log(gnp)) # growth rate plot.ts(gnpgr) The time series is stationary. Given that the mean is nearly zero, at 0.0083, the time series is considered to be stationary. With a variance of roughly 0.0001032, the variations around the mean are rather minor. There isn't a clear pattern that would indicate a trend or seasonality, according to the ACF plot. This is typical behavior for a stationary time series.
STAT 3032 Regression and Correlated Data (3)_[2 pts] Generate the sample ACF plot and the PACF plot of the quarterly growth rate. Make sure that you show the relevant R code and output. Based on the plots, choose two of the following models that would you consider fitting to this time series data. Please select the best answer and explain . Note that the lags are in terms of years. A: The linear regression model B: AR(1) C: AR(4) D: MA(2)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
STAT 3032 Regression and Correlated Data Choose B D The AR(1) model can be fitted to the time series, since the bars in the ACF plot diminish to 0 and the PACF plot cuts off after lag 1. While the PACF plot displays a faster decay, the ACF plot displays a few notable auto- correlations. If the PACF plot shows signs of a cutoff, an MA(2) model might be taken into consideration. The current observation is implied by an MA(2) model to be a linear combination of the final two white noise (innovation) terms. Stated differently, it encapsulates the impact of the two preceding shock phases on the current phase. (4) [2 pts] Fit the AR model you selected in Part (3) using the arima( ) function. Write down the fitted model. Pay attention to the notation. Please show your work with the relevant R code and output. Yt - 0.0083 = 0.3467(Y(t-1)-0.0083) (5)_[2 pts] Produce the ACF plot of the residuals of the fitted model in Part (4). If the model fits the data well, the residuals should behave like white noise. One of the features of the white noise is independence. Based on the ACF plot, do the residuals ( ^ w 1 , ^ w 2 , …) seem independent from each other? Please explain. Hint: use modelName$residuals to get the residuals. Yes, the residuals seem independent from each other. The estimated auto-correlations at lag k are all close to 0 when k ≥ 1.
STAT 3032 Regression and Correlated Data (6)_[1 pt] Predict the next quarterly growth rate. Please use the formula of the fitted model in Part (4). For this part, you are not allowed to use the predict() function. Please show your work. Note: You could use the command str(timesseriesname) to find the number of observations in the time series “gnpgr” Y(t-1)=0.01073488 Yt = 0.0083 + 0.3467(0.01073488-0.0083) = 0.009144 The predicted next quarterly growth rate (Yt) is 0.009144 on average. (7)_[1 pt] Predict the next quarterly growth rate.. Please use the predict( ) function and show your work. Hint: You should get an answer very similar to that of Part (6). Due to the magnitude of the predicted values, some of their after the decimal point could be different. Problem 2 (10 pts) Download the data file HW11_Problem2_Data_F2023.csv from Canvas. The second column value contains the time series data. (a)_[1 pt] How many observations are included in this time series? Please explain how you obtain the answer.
STAT 3032 Regression and Correlated Data (b)_[4 pts] Fit an appropriate model to the time series. What is the equation of the fitted model? Please show your work. Hint: You need to first identify the model type and then obtain the model coefficients. There is a decaying trend in the PACF plot. The ACF plot cuts off after Lag 2. Therefore MA(2) is appropriate.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
STAT 3032 Regression and Correlated Data The fitted model is ^ Y t = 0.0194 + 0.3789 ^ w t− 1 0.4581 ^ w t− 2 (c)_[3 pts] Perform model diagnostics. Please show your work. Hint: use the time series plot and the ACF plot of the residuals.
STAT 3032 Regression and Correlated Data Based on the time series plot, the average of the residuals stay close to 0 as time pass, and the variability of the residuals seems to be similar. Based on the ACF plot, all of the estimated auto-correlations beyond Lag 0 are 0, which means that the residuals are independent like the white noises. Overall, The model passed the model diagnostics. (d)_[2 pts] Predict the next two observations using the model you find in Part (b). Please show your work. You may use the predict( ) function or the formula of the fitted model. The next two observations are predicted as 0.049 and 0.297.