--- On Wed, 1/7/09, Christian Weiß wrote:
> Variable size contains the marketcap of about 2000 firms
> from 11 countries (grouping var country).
>
> I would like to keep only the 100 biggest firms (by
> marketcap) from each country, and delete the residual
> observations.
gen negsize = -size
bys country (negsize) : keep if _n < 101
drop negsize
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/