Bookmark and Share

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

[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

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

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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index