Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <n.j.cox@durham.ac.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: listing all observations of particular id's |

Date |
Sun, 29 Aug 2010 16:30:11 +0100 |

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 n.j.cox@durham.ac.uk 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/

**Follow-Ups**:**st: RE: RE: listing all observations of particular id's***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**Re: st: RE: listing all observations of particular id's***From:*Abhimanyu Arora <abhimanyu.arora1987@gmail.com>

**References**:**st: listing all observations of particular id's***From:*Abhimanyu Arora <abhimanyu.arora1987@gmail.com>

- Prev by Date:
**RE: st: one way anova or kruskal wallis if sample size is less than 3 for each group** - Next by Date:
**Re: st: RE: listing all observations of particular id's** - Previous by thread:
**st: listing all observations of particular id's** - Next by thread:
**Re: st: RE: listing all observations of particular id's** - Index(es):