Hi,
I have a time series with positive and negative values which I want to divide into two sperate ones. I want to generate one series with only all positive values (and all negative values being 0) and the other series to be only all negative values (all positive values being 0).
For example:
1. 1
2. -2
3. 4
4. -3
1. 1
2. 0
3. 4
4. 0
1. 0
2. -2
3. 0
4. -3
I tried and I failed miserably.
Thanks for the help!
Divide one series into two
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Divide one series into two
Series y = @recode(x>0,x,0)
Who is online
Users browsing this forum: No registered users and 2 guests
