Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: -hhset- hrespnr?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: -hhset- hrespnr?
Date   Thu, 6 Mar 2008 21:59:23 -0000

It seems that you have data on individuals, some male, some female; 
some husbands, some wives, some other categories. 

Your definitions are 

gen wife = ms == 2 & sex == 1 & head == 2 

gen husband = ms == 2 & sex == 1 & head == 1 

I assume here heterosexual marriages. Hence a husband must 
be male. So sex == 1 is wrong to define husbands if, as you say, 
that designates females. 

Nick
[email protected] 

Nirina F

Dear Nick,
I looked at what you put together on Stata faqs
http://stata.com/support/faqs/data/members.html
so could you may be help me in this.
I have one dataset so I don't need to merge but to separate members of
household out but then be able to run a
reg income ageofwife ageofhusband schoolingofwife fe
This is how I defined

gen wife=0
replace wife=1 if  ms==2 & sex==1 & head==2

[ms is marital status, taking value 2 if married
sex is gender, taking value 1 if female
head is the relationship to hh head, taking value 2 if wife]

gen husband=0
replace husband=1 if  ms==2 & sex==1 & head==1

I have one dataset so I don't need to merge but to separate members of
household out but then be able to run an equation like:

reg income ageofwife ageofhusband schoolingofwife schoolingofhusband

I know something is wrong with my definition above because I get 0
observation when I run the regression.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index