Dummy Variable Help

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Dummy Variable Help

Postby Becca88222 » Fri Apr 30, 2010 4:27 pm

I'm using Eviews6 student version

This is my dilemma:

I Have data from 1990-2008 for Salaries in Japan.
I have 4 education levels: college, advanced (masters, etc), high school and Junior high...
and I have the salary for each of those 4 education levels for male and female
I have all of that on excel...so I have 8 columns of data

This is my issue: what I want to do is generate an equation where I can compute the salary if i put in 0 for male, 1 for female and 1,2,3,4 for the corresponding education levels

So pretty much what I want to do is to estimate a regression inputting:

ls c salary education gender time


And i have NO CLUE how to create those dummy variables for time and education....plus I have no clue how to create a variable for salary !!

PLEASE HELP!!!!!!!!!!!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Dummy Variable Help

Postby EViews Gareth » Fri Apr 30, 2010 4:36 pm

Your question isn't particularly clear. Without knowing what form your data is currently in, it is hard to say how to transform it.

I have no idea, for example, what you mean by "how to create a variable for salary", given you already said that you have salary information.
Follow us on Twitter @IHSEViews

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Fri Apr 30, 2010 4:42 pm

Sorry If i wasn't clear :D

What I mean is that I don't have one separate variable for salary, what I have is this table in excel

Year College Degree Advanced Degree High School Junior High College Degree Advanced Degree High School Junior High
1990 169.9 145.4 133.0 117.0 162.9 138.1 126.0 107.1
1991 179.4 155.1 140.8 123.5 172.3 146.5 133.2 114.8
1992 186.9 160.9 146.6 128.0 180.1 152.4 139.5 117.2
1993 190.3 165.1 150.6 131.5 181.9 155.6 142.4 120.1
1994 192.4 166.6 153.8 134.9 184.5 157.7 145.5 122.8
1995 194.2 165.1 154.0 142.0 184.0 158.7 144.7 125.5
1996 193.2 166.8 154.5 146.6 183.6 158.7 146.1 130.8
1997 193.9 168.9 156.0 141.6 186.2 161.0 147.3 131.8
1998 201.5 174.4 156.5 143.4 186.3 161.8 147.9 129.0
1999 196.6 170.3 157.6 144.1 188.7 162.2 148.3 139.5
2000 196.9 171.6 157.1 140.6 187.4 163.6 147.6 137.5
2001 198.3 170.3 158.1 145.1 188.6 163.8 148.7 134.0
2002 198.5 169.5 157.5 141.9 188.8 164.3 148.8 125.7
2003 201.3 169.8 157.5 151.2 192.5 163.5 147.0 133.5
2004 198.3 170.7 156.1 145.4 189.5 164.2 147.2 137.6
2005 221.0 196.7 170.3 155.7 216.6 189.3 164.2 148.0
2006 224.6 199.8 171.2 157.6 226.0 190.8 166.8 149.4
2007 224.6 198.8 171.2 158.8 226.7 191.4 166.9 150.8
2008 226.2 201.3 171.6 160.0 223.6 194.6 168.6 154.3



Columns 2,3,4,5 are the salaries for Males in Japan according to year and education level
columns 6,7,8,9 are the salaries for Females in Japan according to year and education level...

This is what I want to be able to do:

I want to set up a regression where I can calculate the salary given education sex and year

So I guess what I am doing here is setting up two dummy variables: sex (where 1= female and 0=male) and education: (where you can input 1 for college, 2 for advanced, 3 for high school and 4 for junior high)

Thankssss

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Dummy Variable Help

Postby EViews Gareth » Fri Apr 30, 2010 4:45 pm

This is one of those cases where it is probably easier for an EViews novice to do it in Excel rather then EViews.

If you want to do it in EViews, post the Excel file.


Edit: Just to be clear - it is probably easier for you to create the dummy variables in Excel, and then bring it into EViews to do the estimation. Especially since you're using the student version.
Follow us on Twitter @IHSEViews

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Fri Apr 30, 2010 4:50 pm

Here is the excel file

Thanks for your help!
Attachments
Male Info.xls
(14.5 KiB) Downloaded 368 times

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Fri Apr 30, 2010 8:30 pm

How would I create the dummy variables in excel?

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

Re: Dummy Variable Help

Postby startz » Fri Apr 30, 2010 9:28 pm

Copy and paste so you have one long series for salary for both men and women. Then make a new column for the dummy and enter 1 for the male entries and 0 for the female entries.

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Fri Apr 30, 2010 9:33 pm

and how would i differentiate between education levels in the list?
and how would i create the dummy for the education level?

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

Re: Dummy Variable Help

Postby startz » Sat May 01, 2010 7:36 am

Make a column that's 1 for college salaries and 0 otherwise. Same for other levels.

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Sat May 01, 2010 8:12 am

I think that I'm not being clear on what I want.......

What i want to do is generate a regression with the variables salary, education and sex so that I can do a hypothesis that proves that women, for every education level, are paid less than men in Japan....

Maybe I'm doing this the wrong way, I don't know

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

Re: Dummy Variable Help

Postby startz » Sat May 01, 2010 8:25 am

So you need one column that lists all salaries. Another column that is 1 or zero according to gender. Another column that is 1 or 0 according to whether the salary was for college level. Etc.

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Sat May 01, 2010 9:02 am

Okaayyyyyyyyy

And how do i account for the year?
The info is from 1990-2008

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

Re: Dummy Variable Help

Postby startz » Sat May 01, 2010 9:04 am

Include a column with the year number!

The trick in all this is that you need one long colunm for each variable you want to use in your regression.

Becca88222
Posts: 9
Joined: Fri Apr 30, 2010 4:11 pm

Re: Dummy Variable Help

Postby Becca88222 » Sat May 01, 2010 9:16 am

Thank you!!

So for the column for the year number its okay to repeat years for example

1990
1991
1992
1993
2008

and then directly underneath:

1990
1991

So forth?

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

Re: Dummy Variable Help

Postby startz » Sat May 01, 2010 9:31 am

You got it!


Return to “Estimation”

Who is online

Users browsing this forum: Google [Bot] and 41 guests