Originally Posted by
bradbrad
Hi!
Just wondering if anyone would like to help me with this.
I'd like to obtain 1000 samples each of 100 observations of the following autoregressive equation
x(t+1) = a*x(t) + e(t+1)
where x is some random variable and e is white noise. To do it once, you can write a for loop as follows:
x(1) = 0
for t = 1:100
x(t+1)=a*x(t) + e(t+1)
end
That's fine. But how would I repeat the process 1000 times, each time with a different 100 observation sample for e and also have the x series from each sample stored?
Cheers guys.