Question: Please provide the coding for R programming. 1. Consider the time-series process {yt} defined by the data generating process Yt = 2 + et for
Please provide the coding for R programming.


1. Consider the time-series process {yt} defined by the data generating process Yt = 2 + et for all t = 1, ... , where {et} is an i.i.d. normally distributed sequence with mean zero and variance o = 4. The random variable z does not change over time (so it is uncorrelated with et) and comes from a discrete uniform distribution in the closed interval [0;100]. a. Produce 20 realizations of this time-series process with n = - 100. Graph all 20 realizations in a graph similar to those produced in the section 2(2) slides. Interpret your graph. Does it appear that the process is stationary? Does it appear to be weakly dependent? Justify your answer. b. Analytically (i.e., using a pen and paper instead of R) find the expected value and variance of yt. Do your answers depend on t? Interpret. C. Find Covlyt, Yt+h) for any t and h. Is Yt covariance stationary? Justify your answer? d. Find Corr(yt, Yt+n). Does yt appear to be weakly dependent? Justify your answer. 2. Consider the time-series process Yt defined by the data generating process Yt = cos(tw) for all t = 1, ..., where w is a random variable with a continuous uniform distribution in the open interval (O; 21t) and cos() is the cosine function. a. Produce 10 realizations of this time-series process with n = 50. Graph all 10 realizations in a graph. Interpret your graph. Does it appear that the process is covariance stationary? Does it appear to be weakly dependent? Justify your answer. b. Using R or your pen and paper or any other resource, find the expected value, variance, and covariances of yt to determine whether the process is covariance stationary. Justify your answer. Is the process strongly (sometimes called strictly) stationary? Why or why not? Justify your answer. C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
