Skip to content

Instantly share code, notes, and snippets.

@ChadFulton
Created September 28, 2020 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChadFulton/d24165ba4d409ffa03560c8dfd388e1c to your computer and use it in GitHub Desktop.
Save ChadFulton/d24165ba4d409ffa03560c8dfd388e1c to your computer and use it in GitHub Desktop.
Simulate AR(1)
# Parameters
nobs = 100
mean = 2.0
phi = 0.5
sigma2 = 2.4
# Simulate
tmp = [0]
mod = sm.tsa.arima.ARIMA(tmp, order=(1, 0, 0), trend='c')
mod.simulate([mean, phi, sigma2], nobs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment