Creating a serie that =1 if another variable is =2 or 3

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Eirikeb
Posts: 3
Joined: Mon Feb 07, 2011 8:49 am

Creating a serie that =1 if another variable is =2 or 3

Postby Eirikeb » Tue Mar 22, 2011 4:44 am

Hi, sorry for any bad English!

I am trying to create a serie like this: series z=1 if pbj=2 or 3, and z=0 if PBJ is not 2 or 3. But I can't do it! I tried searching the manual and the internet, but found nothing. Using eviews6.

Thanks in advance!

EDIT: Can/can't

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Creating a serie that =1 if another variable is =2 or 3

Postby trubador » Tue Mar 22, 2011 6:09 am

Code: Select all

series z = @recode(pbj=2 or pbj=3,1,0)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest