Bookmark and Share

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

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

st: Computing proportions within generated reference groups

From   Namrata Chindarkar <[email protected]>
To   [email protected]
Subject   st: Computing proportions within generated reference groups
Date   Tue, 30 Aug 2011 10:54:07 -0400

Dear Statalisters,

I have created reference groups in my dataset using -egen- and now
want to compute proportions within those groups for certain variables.
For instance, for the income variable, I want to compute the
proportion of individuals that have income greater than income of
individual "i" in each reference group. As an example if group1 has 5
individuals with incomes 30, 20, 10, 60, and 70 respectively, I want
to be able to get values 0.4, 0.6, 0.8, 0.2, and 0 respectively.
Any suggestions on how to write a STATA program to compute this?

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index