Generating DGPs (genr or append)
Posted: Wed Jul 06, 2016 6:09 am
Should I use genr or append when generating DGPs? Please see the question in the attachment.
Code: Select all
create u 100
series e1 = nrnd
series e2=nrnd
smpl 1 2
series x=nrnd
series y=nrnd
!nrep = 1
smpl 3 @last
scalar rho = 0.3
scalar psi=0.2
FOR !REP=1 TO !NREP
genr x = 1 + x(-1) + rho * (x(-1)-x(-2)) + e1
genr y = 1 + y(-1) + rho * (y(-1)-y(-2)) + psi * (x(-1)-x(-2)) + e2
NEXT
FOR !REP=1 TO !NREP
model mod1
mod1.append x = 1 + x(-1) + rho * (x(-1)-x(-2)) + e1
mod1.append y = 1 + y(-1) + rho * (y(-1)-y(-2)) + psi * (x(-1)-x(-2)) + e2
mod1.solve
delete mod1
NEXT
show x x0 y y0