Page 1 of 1

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

Posted: Tue Mar 22, 2011 4:44 am
by Eirikeb
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

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

Posted: Tue Mar 22, 2011 6:09 am
by trubador

Code: Select all

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