Statalist


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

RE: st: converting continuous var to ordinal with equal obs numbers per group


From   Maarten buis <[email protected]>
To   stata list <[email protected]>
Subject   RE: st: converting continuous var to ordinal with equal obs numbers per group
Date   Sat, 28 Nov 2009 02:59:23 -0800 (PST)

--- Nikolaos Pandis wrote
> I  a continuous variable (age) with a range from 15-86 and around 1500
> observations. How could I convert it into an ordinal variable with equal
> number of observations per group, given that I would like to have around
> 15 groups.

egen catage = cut(age),  group(15)

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   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/



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