Statalist


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

Re: st: RE: Creating a variable that contains the 2nd, 3rd or 4th largest value in a row


From   "James Cross" <jcross@tcd.ie>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Creating a variable that contains the 2nd, 3rd or 4th largest value in a row
Date   Tue, 25 Nov 2008 16:47:16 +0000

That will do it, cheers!

2008/11/25 Martin Weiss <martin.weiss1@gmx.de>:
> -ssc d rowsort-
>
> HTH
> Martin
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of James Cross
> Sent: Tuesday, November 25, 2008 5:32 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Creating a variable that contains the 2nd, 3rd or 4th largest
> value in a row
>
> Hi,
>
> I am trying to create a variable that identifies the 2nd, 3rd or 4th
> largest value in a row of variables. I can identify the largest value
> suing the following command:
>
> egen max= rowmax(varlist)
>
> However I am not sure how to create a variable that identifies the
> 2nd, 3rd or 4th highest value.
>
> Thanks,
> James Cross
> *
> *   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/
>
>



-- 
Best Regards,

James Cross
*
*   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