Question: (a) Generate n = 100 observations from the autoregression xt = .9xt2 + wt with w = 1, using the method described in Example 1.10,

(a) Generate n = 100 observations from the autoregression xt = −.9xt−2 + wt with σw = 1, using the method described in Example 1.10, page 13. Next, apply the moving average filter vt = (xt + xt−1 + xt−2 + xt−3)/4 to xt, the data you generated. Now plot xt as a line and superimpose vt as a dashed line. Comment on the behavior of xt and how applying the moving average filter changes that behavior. [Hints: Use v = filter(x, rep(1/4, 4), sides = 1) for the filter and note that the R code in Example 1.11 may be of help on how to add lines to existing plots.]

(b) Repeat

(a) but with xt = cos(2πt/4).

(c) Repeat

(b) but with added N(0, 1) noise, xt = cos(2πt/4) + wt.

(d) Compare and contrast (a)–(c).

Section 1.4

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 Regression Analysis Questions!