Statalist


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

Re: st: -merge- which one would make sense?


From   "Nirina F" <fstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -merge- which one would make sense?
Date   Wed, 21 May 2008 18:52:27 -0400

Dear David and Friedrich,

You are right, within one household, there are the wife and husband,
children and other people like mother of husband.
This is the code I used originally:

Using the original data:

keep if sex==1 & maritalstatus==1
foreach x of var * {
	rename `x' h_`x'
}

gen hid=h_hhid
sort hid
save  husband.dta

keep if sex==2 & maritalstatus==1
foreach x of var * {
	rename `x' w_`x'
}
gen hid=w_hhid
sort hid
save wife.dta
merge using husband.dta

I also tried to include line number of respondent after each -keep-
but it does not give me the answer where answers from husband on hh
characteristics should match wive's.
I am looking into details of what I have.
thank you,
nirina



On 5/21/08, Friedrich Huebler <fhuebler@gmail.com> wrote:
> Nirina,
>
> Further to my earlier question, I assume you have a variable that
> identifies the marital status of each household member. Your
> description is not clear but from what I understand you selected men
> and women whose marital status is "married" and then assumed that a
> married man and a married woman in the same household are each other's
> spouse. Is this what you did? What did you do with households with
> more than one married man and woman?
>
> Other possibilities are that you have a variable with the line number
> of each household member's spouse or a variable that describes the
> relationship to the household head. Either way, we need more
> information in order to help you.
>
> Friedrich
>
> On Wed, May 21, 2008 at 10:56 AM, Friedrich Huebler <fhuebler@gmail.com> wrote:
> > Nirina,
> >
> > First, please include the Stata commands you used.
> >
> > Second, how do you identified husbands and wives? A married man and a
> > married woman living in the same household are not necessarily married
> > to each other.
> >
> > Friedrich
> >
> > On Wed, May 21, 2008 at 8:29 AM, Nirina F <fstata@gmail.com> wrote:
> >> Hello,
> >> I have a microdataset with 5000 individuals. In the data, I have
> >> household questionnaires and individual questionnaires together, pid,
> >> hhid.
> >>
> >> I did the following scenarios and now I'm lost:
> >>
> >> 1- I separated the household(hh) questionnaire from the individual(i)
> >> questionnaires.
> >> I split the remaining individual questionnaires into married female
> >> and  married male renamed all variables accordingly.
> >> Then I merged the male and female because they are husband and wife by
> >> their household id. I had 2000 households
> >> Afterward, I merged the hh questionnaire. I end up back to 5000 observations.
> >>
> >> 2- I kept the original dataset and just split into two datasets
> >> married female and  married male which I merged afterward to have
> >> husband and wives. I arrive at 2000 observations.
> >> When I assert if household information from husband and wife is the
> >> same, almost 90% of the observation is false.
> >>
> >> What do you think I should do? Which one of the two should make sense?
> >> Thank you very much from your help.
> >> Nirina
> >
> *
> *   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/
>
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index