Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Partitioning a Categorical Variable Based on Frequencies

From   Angela James <>
Subject   st: Partitioning a Categorical Variable Based on Frequencies
Date   Sat, 20 Aug 2005 22:14:38 -0700

I'm trying to partition a categorical variable into classes based on
the observed frequency for each category.  That is, I have about 800
companies that I'd like to group into 1) "large," 2) "medium", and 3)
"small" companies based on the observed number (frequency) of employees
for each company.  Can anyone help me locate the appropriate command to
do this?

Also, I need to rank the largest 40 or so companies by any number of
criteria -- % female, % with employees over 40 years of age, etc.  I've
tried using the rank function with egen, but it simply ranks the
companies according to the value for each (which is derived from their
alphabetical, sequential ordering after I encoded the variable).
Again, what is the easiest way to incorporate the observed frequency of
different types of employees for each company into these analyses?

Thanks in advance.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index