Statalist


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

st: RE: expanding on -egen rowmin()-


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: expanding on -egen rowmin()-
Date   Wed, 22 Oct 2008 23:03:41 +0100

This problem arises a lot, and has been discussed frequently on the list, but -egen- is not the right keyword to search on. 

Search the archives using -rowsort- and -sortrows- as key words. 

Or doing it in Mata by using -egen, rowmedian()- from -egenmore- on SSC as a starting-point. 

Also, if you want this, you might consider -reshape-, -generate- and -reshape- as a sequence. 

Nick 
n.j.cox@durham.ac.uk 

Augusto Cadenas

I wanted to go beyond the command -egen rowmin(/varlist/)- and create
a new variable containing the second-smallest value in /varlist/,
another one with the third-smallest and so one. Could anyone suggest
me a way to do this? I searched among the extensions of egen, but I
could not find anything suitable.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index