[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: making a matched data set
bysort hhid: gen num = _N
drop if num == 1
where, in this case, _N is the number of observations for each group (for
more helpful advice see Nick Cox's "Speaking Stata: How to move step by:
step" Stata Journal (2)1 )
Hope this helps,
> -----Original Message-----
> From: email@example.com [mailto:owner-
> firstname.lastname@example.org] On Behalf Of email@example.com
> Sent: Tuesday, August 17, 2004 6:57 PM
> To: firstname.lastname@example.org
> Subject: st: making a matched data set
> Dear all,
> I want to make a matched-couple data set. All respondents are married in
> 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
> wives, but it seems that's not true. Would you give me some suggestions?
> where can I find out some information about that? I couldn't find it.
* For searches and help try: