Question: In this problem, we explore the difference between a random walk and a trend stationary process. (a) Generate four series that are random walk with
In this problem, we explore the difference between a random walk and a trend stationary process.
(a) Generate four series that are random walk with drift, (1.4), of length n = 100 with δ = .01 and σw = 1. Call the data xt for t = 1, . . ., 100. Fit the regression xt = βt + wt using least squares. Plot the data, the true mean function (i.e.,
µt = .01 t) and the fitted line, xˆt = βˆ t, on the same graph. Hint: The following R code may be useful.
(b) Generate four series of length n = 100 that are linear trend plus noise, say yt = .01 t + wt , where t and wt are as in part (a). Fit the regression yt = βt + wt using least squares. Plot the data, the true mean function (i.e., µt = .01 t) and the fitted line, yˆt = βˆ t, on the same graph.
(c) Comment (what did you learn from this assignment).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
