Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: making a matched data set


From   [email protected]
To   [email protected]
Subject   st: making a matched data set
Date   Tue, 17 Aug 2004 18:57:08 -0500

Dear all,
I want to make a matched-couple data set. All respondents are married in this
data set. What I want to know is how to drop non-matched case like the
following first household (hhid=0000045). or keep matched-couple cases.
At first I thought I can use "merge" command after separating husbands from
wives, but it seems that's not true. Would you give me some suggestions? or
where can I find out some information about that? I couldn't find it.

Thanks,
Hae-Bong

hhid: household id
sn: serial number within each household
relate: relationship (1=householder / 2=husband or wife)


. by hhid: list hhid sn relate sex

-------------------------------------------------------------------------------
-> hhid = 0000045

     +--------------------------------+
     | hhid         sn   relate   sex |
     |--------------------------------|
  1. | 0000045      01       01     1 |
     +--------------------------------+

-------------------------------------------------------------------------------->
hhid = 0000223

     +--------------------------------+
     |  hhid        sn   relate   sex |
     |--------------------------------|
  1. |  0000223     01       01     1 |
  2. |  0000223     02       02     2 |
     +--------------------------------+

-------------------------------------------------------------------------------->
hhid = 0000378

     +--------------------------------+
     |  hhid        sn   relate   sex |
     |--------------------------------|
  1. |  0000378     01       01     1 |
  2. |  0000378     02       02     2 |
     +--------------------------------+

*
*   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