Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. (optional with 5 bonus points) Write a function named AR to calculate the autocovariance functions of an AR(p) model. The function shall have three
4. (optional with 5 bonus points) Write a function named AR to calculate the autocovariance functions of an AR(p) model. The function shall have three input variables, the vector of length p that has the coefficients 01,02,0p, the variance of the white noise W, and the maximum lag the autocovariances are to be calculated. Submit the code that defines the function, run an example and compare your results with those from ARMAacf (Note ARMAacf only provides autocorrelations). For example, AR(C(0.9, -0.16, -0.02), 1, 6) should produce the results for Problem 3 above. 4. (optional with 5 bonus points) Write a function named AR to calculate the autocovariance functions of an AR(p) model. The function shall have three input variables, the vector of length p that has the coefficients 01,02,0p, the variance of the white noise W, and the maximum lag the autocovariances are to be calculated. Submit the code that defines the function, run an example and compare your results with those from ARMAacf (Note ARMAacf only provides autocorrelations). For example, AR(C(0.9, -0.16, -0.02), 1, 6) should produce the results for Problem 3 above
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