recode data question

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

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

megan
Posts: 5
Joined: Wed Oct 08, 2008 1:18 pm

recode data question

Postby megan » Wed Oct 29, 2008 3:18 pm

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!!

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

Re: recode data question

Postby EViews Gareth » Wed Oct 29, 2008 3:42 pm

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)
Follow us on Twitter @IHSEViews

megan
Posts: 5
Joined: Wed Oct 08, 2008 1:18 pm

Re: recode data question

Postby megan » Wed Oct 29, 2008 3:50 pm

Tks a lot, it works now!!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 6 guests