<jupyter_start><jupyter_text>Lab 21. Use the random numbers you generated in the previous lab and create a simple random walk process.<jupyter_code>w10 <- rnorm(10, 0, 1); x10 = cumsum(w10)
w30 <- rnorm(30, 0, 1); x30 = cumsum(w30)
w100 <- rnorm(100, 0, 1); x100 = cumsum(w30) 
w10000 <- rnorm(10000, 0, 1); x10000 = cumsum(w10000)
plot(x10)<jupyter_output><empty_output><jupyter_text>Estimate the ﬁrst 10 autocovariance and autocorrelation estimates, and produce a correlogram.<jupyter_code>acf(x100, type = "covariance", lag.max = 10)
acf(x100, type = "correlation", lag.max = 10)<jupyter_output><empty_output><jupyter_text>Does the ACF die if you increase the lag.max to its maximum value?Describe your results.<jupyter_code>acf(x100, lag.max = 100)<jupyter_output><empty_output><jupyter_text>2. Generate an MA series $x_t = 0.6 w_t + 0.3 w_{t−1}$ and $n = 10,30,100,10000$. Produce correlograms and interpret.<jupyter_code>v10 = filter(w10, filter=c(0.6,0.3), method="convolution", sides = 1)
v30 =  filter(w30, filter=c(0.6,0.3), method="convolution", sides = 1)
v100 =  filter(w100, filter=c(0.6,0.3), method="convolution", sides = 1)
v10000 =  filter(w10000, filter=c(0.6,0.3), method="convolution", sides = 1)
acf(v10)
acf(v30)
acf(v100)
acf(v10000)<jupyter_output><empty_output><jupyter_text>3. Generate an MA series $x_t = 0.2 w_{t−1} + 0.5 w_t + 0.3 w_{t+1}$ and $n = 10,30,100,10000$. Produce correlograms and interpret.<jupyter_code>v10 =  filter(w10, filter=c(0.2,0.5,0.3), method="convolution", sides = 2)
v30 =  filter(w30, filter=c(0.2,0.5,0.3), method="convolution", sides = 2)
v100 =  filter(w100, filter=c(0.2,0.5,0.3), method="convolution", sides = 2)
v10000 = filter(w10000, filter=c(0.2,0.5,0.3), method="convolution", sides = 2)
acf(v10)
acf(v30)
acf(v100)
acf(v10000)<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup