Page 1 of 1

recode data question

Posted: Wed Oct 29, 2008 3:18 pm
by megan
Hello,

Can anyone help me with this?

I want to separate a series into two classes: large and small. The raw data X run from -3 to 1. If a number is between -0.14 to 0.14, it is considered small, otherwise large.

I wrote series large=recode( X>0.14 or X<-0.14,X,0)
series small=recode(-0.14<X<0.14,X,0)

However, the resulting series aren't correct. Where were my problems?

Many thanks!!

Re: recode data question

Posted: Wed Oct 29, 2008 3:42 pm
by EViews Gareth
Your large series should be correct, you just need to use the same idea for the small series:

series small = @recode(X<0.14 and x>-0.14,x,0)

Re: recode data question

Posted: Wed Oct 29, 2008 3:50 pm
by megan
Tks a lot, it works now!!