Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with 2 Generate a time series {Y_t} with length 2000 from the follow

ID: 3229969 • Letter: I

Question


I need help with 2 Generate a time series {Y_t} with length 2000 from the following model: Y_t = sigma_t u_t, sigma^2_t = 1 + 0.5Y^2_t-1, where {u_t} are iid normal with mean 0 and standard deviation one. (i) Plot the time series {Y_t} as well as Y^2_t. (ii) Plot the PACFs of the two series in (i). (iii) Identify an appropriate model for the sample of Y_t and write down your estimated model. (iv) Use ARIMA(.) with Maximum Likelihood Estimation (MLE) to estimate the parameter of the AR(I)-process {Y_t} and report your estimated model. (v) Provide your R codes. Generate a me series {Y_t} with length 2000 from the following model Y_t = 0, 5Y_t-1 + epsilon_t - 0.5E_t-1, where {u_t} are iid normal with mean 0 and standard deviation one. (a) Plot the time series {Y_t}. (b) Plot the ACF and PACF of the time series. (c) Identify an appropriate model (AP) for the sample of Y_t. Why do you choose the AP model? (e) Do regression diagnostics for the estimated model in (d) That is, (1) to present Q-Q plot of the residuals; (2) to present standard residual plot; (3) to present the ACF of the residuals (f) Provide your R code.

Explanation / Answer

Answer: Below is the R code for your question.

Copy and paste it as it is. If you miss anything, the code might not work.

##### R CODE ######


rm(list=ls(all=TRUE))

# Generate the given model. The Model is ARMA(1,1) model with phi1 = 0.5 and theta1 = 0.5

set.seed(123)
y=arima.sim(n=2000,list(ar=0.5,ma=0.5))
summary(y)

# Plot the time series y.

ts.plot(y,main="TIME SERIES PLOT")

# Plot ACF and PACF of y.

par(mfrow=c(2,1)) # to show both plots in one screen
acf(y)
pacf(y)

# To find appropiate model for y.

arima(y,c(1,0,0))$aic # AIC for AR1 model
arima(y,c(2,0,0))$aic # AIC for AR2 model
arima(y,c(3,0,0))$aic # AIC for AR3 model
arima(y,c(0,0,1))$aic # AIC for MA1 model
arima(y,c(0,0,2))$aic # AIC for MA2 model
arima(y,c(0,0,3))$aic # AIC for MA3 model
arima(y,c(1,0,1))$aic # AIC for ARMA11 model
arima(y,c(1,0,2))$aic # AIC for ARMA12 model
arima(y,c(2,0,1))$aic # AIC for ARMA21 model

## THE APPROPIATE MODEL IS ARMA11 BECAUSE IT HAS THE MINIMUM AIC VALUE (YOU CAN
## CHECK AGAINST ANY MODEL, ARMA11 WILL BE BEST). AND ALSO
## THE MODEL IS GENERATED FROM ARMA11.

# Estimated Model for y.

arima(y,c(1,0,1))

## THE ESTIMATED VALUES ARE: PHI1 = 0.4492 AND THETA1 = 0.5147
## REMEMBER THESE ESTIMATES ARE FOR THE GIVEN VALUES OF Y FOR SEED 123. ONCE THE
## SEED CHANGES THE VALUES WILL ALSO CHANGE.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote