Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Nick Darson <[email protected]>
To   [email protected]
Subject   st: rowranks/ ranking only a selection of variables (subgroup of ordered variables)
Date   Sat, 10 Mar 2012 14:38:19 +1100

Dear Stata-fellows,

I need to solve the following problem. I have 8 options (ordered,
option0 - option8). Subjects have rated the quality of each of the 8
options.

Now I need to create several rank variables of the options for each
subject. I have already downloaded "rowranks", written by Nick Cox .

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) )

For my example above, I would need something like:  rowranks (option0,
option2, option3, option4, option8)= gen (rank_option0,
rank_option2...) , i.e. a selection of variables only, not the entire
set.

The only idea I have in mind (using rowranks), would be to create
number sequences for each choice set. Not very handy.

Does anyone have some idea how to solve this quickly?

Any help appreciated (I can imagine that many people might face a
similar situation).

Cheers
Nick
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index