Dummy-variable

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Dummy-variable

Postby Pantera » Mon Jun 20, 2011 7:55 am

Hi all,
In a balanced, stacked panel: 7 sections and a time horizon of 13 years (7 x 13 = 91 observations), I want to generate a single dummy variable which takes the value 1 at row (observation) 42 (at section #4 at time point 1999) and zero otherwise. How do I do that - any suggestions?

Regards,
P

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

Re: Dummy-variable

Postby EViews Gareth » Mon Jun 20, 2011 9:07 am

Code: Select all

series dum=0
smpl 1999 1999 if @crossid=4
dum=1
Follow us on Twitter @IHSEViews

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Re: Dummy-variable

Postby Pantera » Mon Jun 20, 2011 3:03 pm

Thanks - your solution function perfectly.

P.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: Google [Bot] and 10 guests