Separate regression based on categorical variable

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

wsjUNMC
Posts: 6
Joined: Mon Jun 29, 2015 10:01 pm

Separate regression based on categorical variable

Postby wsjUNMC » Wed Dec 09, 2015 4:53 am

Hi,

I would like to ask if there is any command to run separate regressions based on a categorical variable.

For example, I have a categorical variable GENDER with 1 = male and 0 = female.
I would like to generate a regression only with male data and a separate one only with female data.

Is there a command to do this directly using the same dataset or do I have to manually separate them into two files and run them separately?

Thank you for your clarification.

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

Re: Separate regression based on categorical variable

Postby startz » Wed Dec 09, 2015 7:10 am

smpl if gender=1
ls whatever
smpl if gender=0
ls whatever

wsjUNMC
Posts: 6
Joined: Mon Jun 29, 2015 10:01 pm

Re: Separate regression based on categorical variable

Postby wsjUNMC » Wed Dec 09, 2015 10:27 pm

Hi startz,

Thanks for the info. It is running well now :D


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 1 guest