Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: rowranks/ ranking only a selection of variables (subgroup of ordered variables)


From   Nick Darson <nick.darson@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: rowranks/ ranking only a selection of variables (subgroup of ordered variables)
Date   Sat, 10 Mar 2012 20:18:02 +1100

Thanks Maarten, that did help!!

Sorry, still quite new to Stata ...

Cheers
Nick

On Sat, Mar 10, 2012 at 8:04 PM, Maarten Buis <maartenlbuis@gmail.com> wrote:
> On Sat, Mar 10, 2012 at 4:38 AM, Nick Darson  wrote:
>> However, in my case each person has faced several subsets of choices
>> (example: only option0, option2, option3, option4, option8) and I need
>> to create the ranking order of each subject for each subset.
>>
>> The problem is (to my understanding) that rowranks requires always a
>> consecutive order of the variables that are ranked (e.g., syntax is:
>>  rowranks x1-x5, gen(rank_x1-rank_x5) )
>
> That is incorrect, -rowrnks- requires a varlist: see -help varlist-.
> So you can type -rowranks(x1 x2 x5 x300000), ...-. Notice, that there
> are no commas between the variable names.
>
> The varlist x1-x5 is just a short-cut that is sometimes useful. I
> actually hardly ever use it. Instead I tend to make heavy use of the *
> and ? characters. Neither shortcut will help you in this case, you'll
> just have to explicitly spell the entire list, which is not a problem
> just more work.
>
> 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/

*
*   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   |   Site index