Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: tagging observations where either x or y are true


From   Michael McCulloch <[email protected]>
To   Statalist Statalist <[email protected]>
Subject   st: tagging observations where either x or y are true
Date   Sun, 25 Oct 2009 15:08:04 -0700

I'd appreciate advice on this problem which although apparently simple is somewhat vexing.
Note that for:
	sample 30.1 only y is true,
	sample 34.3 only x is true,
but 	sample 34.1 both x and y are true,

    sampleid   x     y
        30.1         0      1
        34.1         1      0
        34.1         0      1
        34.3         1      0

What I'd like to achieve is only one entry for 34.1, where both x and y ==1. I can identify 34.1 with -duplicates-, but can't figure out the next step of concatenating observations for that sampleid such that x=y=1.


Michael McCulloch
Pine Street Foundation
124 Pine Street
San Anselmo, CA 94960-2674
tel:	415-407-1357
fax: 	206-338-2391
[email protected]






*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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