I am trying to simulate an ARMA(2,1) process using the following code:
For some reason, the rest of the observations for ut remain missing values after I run the last line of the code. I can't figure out exactly what I am doing wrong. I would really appreciate some help.
Thanks!
Code:
clear set obs 100 gen t=_n tsset t gen et = rnormal() // generating epsilon_t gen ut = et in 1 replace ut = 0.8*L1.ut - 0.6*L2.ut + et + 0.5*L1.et if t>1
Thanks!
Comment