Created
June 25, 2019 20:51
-
-
Save baogorek/a50b72a48c33f3f6e1f09258cbcb91ed to your computer and use it in GitHub Desktop.
non-invertible-ma-process.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N <- 10000 | |
theta <- 1.4 | |
e <- rnorm(N) | |
e_lag <- c(NA, e[1:(N-1)]) | |
y <- e - theta * e_lag | |
acf(y[2:N]) | |
l = 5000 # how far back | |
y_far_back <- c(rep(NA, l), y[1:(N-l)]) | |
summary(lm(y ~ y_far_back)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment