Created
November 10, 2013 15:40
-
-
Save alchemyst/7399683 to your computer and use it in GitHub Desktop.
Generate lagged AR data
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 = 1000 | |
h = 5 | |
y = numpy.random.randn(N) | |
x = numpy.zeros_like(y) | |
for i in range(h, len(y)): | |
x[i] = x[i-1] + y[i - h] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment