SHAZAM Community
Ask Your Question

How do I simulate a first order Autoregressive process - AR(1)?

asked 2011-03-12 08:58:27 +0000

A SHAZAM User asked:

I’m trying to generate (simulate) an autoregressive process of first order, and in that connection I tried to use the powerful DO#-loop order in Shazam.

Problem: I’m not sure whether I have formulated the process/function correctly. I appreciate a lot if you could take a look at my experiment.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2011-03-16 11:12:28 +0000

ken gravatar image

updated 2011-03-16 11:47:48 +0000

* AR(1) process x=.8*lag(x)
sample 1 10
genr x=1
sample 2 10
genr x=.8*lag(x)
print x

If desired, a random number could be added to the GENR
edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2011-03-12 08:58:27 +0000

Seen: 765 times

Last updated: Mar 16 '11