Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: listing all observations of particular id's


From   Abhimanyu Arora <[email protected]>
To   [email protected]
Subject   Re: st: RE: listing all observations of particular id's
Date   Sun, 29 Aug 2010 17:43:33 +0200

Thanks very much, Nick.
Regards
Abhimanyu


On Sun, Aug 29, 2010 at 5:30 PM, Nick Cox <[email protected]> wrote:
> This is an FAQ.
>
> An answer is
>
> egen anyB1 = max(B) , by(id)
> l if anyB1
>
> The rationale is discussed at tedious length in
>
> How do I create a variable recording whether any members of a group (or all members of a group) possess some characteristic?
>
> <http://www.stata.com/support/faqs/data/anyall.html>
>
> Nick
> [email protected]
>
> Abhimanyu Arora
>
> The basic simplified problem is as follows.
> 2 variables A (id) and B(0/1)
> I would like to list all observations of all A's for which there is at
> least one B=1.
> -list- lists only the particular observations...
>
> *
> *   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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index