Generating DGPs (genr or append)

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Generating DGPs (genr or append)

Postby Kavorka » Wed Jul 06, 2016 6:09 am

Should I use genr or append when generating DGPs? Please see the question in the attachment.
Attachments
What is the difference.pdf
(26.38 KiB) Downloaded 444 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Generating DGPs (genr or append)

Postby EViews Gareth » Wed Jul 06, 2016 7:48 am

In your case they are identical (as shown below):

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

If Y depended on X and X depended on Y you would need to use the model.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests