Statalist


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

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


From   "Augusto Cadenas" <[email protected]>
To   [email protected]
Subject   Re: st: RE: expanding on -egen rowmin()-
Date   Wed, 22 Oct 2008 23:09:44 -0400

Thank you, Nick and Martin, for your helpful replies.

AC

On Wed, Oct 22, 2008 at 6:03 PM, Nick Cox <[email protected]> wrote:
> 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
> [email protected]
>
> 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/
>
*
*   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