Bookmark and Share

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]

st: upper quartile selection for multiple groups


From   Maria Sokolova <maria.sokolova@graduateinstitute.ch>
To   statalist@hsphsun2.harvard.edu
Subject   st: upper quartile selection for multiple groups
Date   Wed, 12 Jun 2013 15:18:43 +0200

I have the following question:
I have big (very big) panel data, for which I need to create dummies
representing the belonging to the top 5% (or 10%) per each categorie.
I have too high number of categories (over 1000) to do it manually.
what I see I am aiming for:
gen dummy=0
bys var1 categ: replace dummy1=1 if sharecateg>=p95(sharecateg)

I have calculated the shares per each observation, but cannot set the
automatic selection of the percentiles.
Best regards and thanks ahead for help,
Maria

--
- - - - -
Maria Sokolova
PhD student International Economics
TA in International Economics
The Graduate Institute of International and Development Studies
Pavillon Rigot (RI13), 11A, avenue de la Paix
1202 Genève, Switzerland
Office hours: Mondays, 10h00-12h00, or by appointment
Cell (Switzerland): +41(0)764642717

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index