Hello,
I have a sample in which any cell can obtain values between 1 and 4. I would like to change the values 1,3 and 4 into 0 and the value 2 into 1. Can anyone please give me a hint? I use Eviews 6.0
Thanks!
Manipulating sample
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Manipulating sample
@recode
Re: Manipulating sample
thank you, but how can use this command exactly?
lets assume, the initial variable is called X and I want to generate a new variable Z in order to obtain only values with 0 and 1. would then the command be
genr z = @recode (X=2, 1, 0)
?
lets assume, the initial variable is called X and I want to generate a new variable Z in order to obtain only values with 0 and 1. would then the command be
genr z = @recode (X=2, 1, 0)
?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Manipulating sample
The manual should be pretty clear about how to use @recode. Since you only have 4 values that your original series can take, that should do what you want. Values of X equal to 2 are mapped to 1, and all others to 0.
Who is online
Users browsing this forum: No registered users and 2 guests
