alphanumeric to numeric

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

LucaEviews
Posts: 1
Joined: Sat Mar 05, 2016 6:29 am

alphanumeric to numeric

Postby LucaEviews » Sat Mar 05, 2016 6:42 am

We have data about gender called 'female' in which we have female and male. We want to make this alphanumeric values numeric.
We already used valmap: female has the label 1 and male has label 0. In this way we could converse female to 0 and 1. The problem is Eviews don't recognize this 0 and 1 as numeric, but recognizes it as alphanumeric. We have to multiply this values, but right know it doesn't work because you can't multiply a string I guess. How can we solve this problem?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: alphanumeric to numeric

Postby startz » Sat Mar 05, 2016 7:08 am

@recode(gender="female",1,0)


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 12 guests