Page 1 of 1

Creating Dummy Variables

Posted: Mon Feb 21, 2011 9:47 am
by pinkclouds
Hi,

I am new to Eviews and I am currently trying to use Eviews 7. I have imported an Excel spreadsheet into Eviews, which has variables such as sex and region for 14000 respondents. Under the sex column my data currently says either male or female for all the respondents.

How would I create a dummy variable, dum_1, which equals 1 if the respondent is male and equals 0 if the respondent is female?

I have already tried various commands and keep getting a message saying 'syntax error'. Should I have created dummy variables before I imported my data into Eviews?

Please help! Thank you!

Re: Creating Dummy Variables

Posted: Mon Feb 21, 2011 10:07 am
by startz

Code: Select all

series dum1 = sex="male"

Re: Creating Dummy Variables

Posted: Mon Feb 21, 2011 10:59 am
by pinkclouds
That's fab! :D Thank you so much! :D