Question: please give the answer code in R ( explain your solution ) Consider my favourite A R ( 2 ) model x t = 1

please give the answer code in R (explain your solution)
Consider my favourite AR(2) model
xt=1.5xt-1-0.75xt-2+wt
where wtNID(0,1). Recall this is the same model we used in Assignment 4, Question
2(b). So expect some consistency with the results you obtained there.
Determine the theoretical auto-correlation function, (h) for the above AR(2) process.
To do this apply the formulae that were derived in the notes (i.e. the recursive calculation
of (h). Use a "for loop" structure. For your final answer you should produce a table
of the theoretical auto-correlation values for lags h=0,1,2,dots,15. As well, use R to
make a plot of this theoretical auto-correlation function, (h) for all lags from 0 to 50
(in the plot command use type="h"). From the information in ACF, what is the period
of this AR(2) process?
Next, generate and plot realizations from this AR(2) model by representing it as a
bivariate AR(1). Again, following the materials in class notes, being sure to first explain
and introduce the problem of converting a univariate AR(2) to a bivariate AR(1). For
simulation purposes, there is code provided on the website that generates realizations
from a bivariate random walk. Please make use of this code and modify it where
necessary to simulate a bivariate AR(1). Annotate each line of the code to say what
it is doing, and also indicate exactly where you have modified it to adapt it to the
bivariate AR(1) model. In your answer, show only the relevant time series plot, not all
the plots given for the 2D random walk.
 please give the answer code in R (explain your solution) Consider

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!