Creating Dummy Variables

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

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

pinkclouds
Posts: 2
Joined: Mon Feb 21, 2011 9:26 am

Creating Dummy Variables

Postby pinkclouds » Mon Feb 21, 2011 9:47 am

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!

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

Re: Creating Dummy Variables

Postby startz » Mon Feb 21, 2011 10:07 am

Code: Select all

series dum1 = sex="male"

pinkclouds
Posts: 2
Joined: Mon Feb 21, 2011 9:26 am

Re: Creating Dummy Variables

Postby pinkclouds » Mon Feb 21, 2011 10:59 am

That's fab! :D Thank you so much! :D


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest