Dummy variables: Generate separate equation

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

hana88
Posts: 12
Joined: Sat Apr 12, 2014 3:36 pm

Dummy variables: Generate separate equation

Postby hana88 » Sat Apr 12, 2014 3:45 pm

Hi All,

My question involves how to generate separate equations for men and women (men=1, women=0)
First, I have been given a standard regression equation of interests which looks like this:
sleep = B0 + B1*totwrk + B2*educ + B3*age + B4*age^2 + B5*yngkid + u


And then I am asked to generate separate equation for men and women. I am just wondering how do you get this in Eviews? Can someone help me with this?

Thanks.

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

Re: Dummy variables: Generate separate equation

Postby startz » Sat Apr 12, 2014 4:07 pm

If the variable is called MEN, then
smpl if men
ls
smpl if not men
ls

hana88
Posts: 12
Joined: Sat Apr 12, 2014 3:36 pm

Re: Dummy variables: Generate separate equation

Postby hana88 » Sat Apr 12, 2014 4:10 pm

Hi startz thanks for the response.

Forgot to mention that I've been given male series which has 1s and 0s in it.

Does this mean that I have to create another variable like men etc?

Thanks again!

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

Re: Dummy variables: Generate separate equation

Postby startz » Sat Apr 12, 2014 4:12 pm

Use

Code: Select all

smpl if male

hana88
Posts: 12
Joined: Sat Apr 12, 2014 3:36 pm

Re: Dummy variables: Generate separate equation

Postby hana88 » Sat Apr 12, 2014 4:14 pm

Yup got it. Thanks!!


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests