I am looking for a package to analyze rank-order data in the form of regression. My outcome (dependent) variable is a rank ordering in the sense that the respondents to a questionnaire were asked a single question: to assign the values 1 to 4 to four different objects (e.g. to rank four cars as best , second best etc). Their first preference was number 1, their second was number 2 etc. So, for each respondent we have four observations.

My first reaction was to analyze the data as a repeated-measures design where I considered the four rankings as four observations for the same person (one response per option). This would be an easy case of ordinal regression (e.g. proportional odds model) using the excellent package of Frank Harrel (thank you Frank). However, these are not four independent observations per person, because if a respondent assigned the values to the first three objects, then the rank of the fourth object is pre-determined.

Does anyone know if there is a package that can fit a more appropriate model such as the Sin‐Ho Jung and Zhiliang Ying (2003) "Rank‐based regression with repeated measurements data", Biometrica, 90 (3), 732-740.


2 Answers 2


One person assigns a value to four objects and the values are ordered. If three objects are assigned values, the value to be assigned to the fourth object is predetermined.

Now, this means that for each observation, we have a permutation of {1,2,3,4}.

All possible permutations are 24 for this set. Each permutation can be given an id. This id column will represent all 4 readings for that observation. Now, this id column will replace the four columns in dependent variable and we can regress it using say, logistic model. Number of classes will be 24, so this thing will depend upon what all permutations you have and the number of observations as well. So, depending upon no. of observations and no. of actual permutations present, you can give "id"s accordingly. Now, when you predict the permutation, we will at once know the permutation e.g. by 12 if we mean {2,1,4,3} then if predicted reading is 12, we will at once get the column of readings.

  • $\begingroup$ ... I am sorry, I pressed ENTER accidentally.but this does not solve the problem, because if I assign the value of "2" to one of the objects, then I cannot observe the same value again... still, even leaving one variable out, there is always some relationship between the others... $\endgroup$
    – Iasonas
    Jan 16, 2012 at 8:26
  • $\begingroup$ See my edited answer. $\endgroup$
    – nb1
    Jan 16, 2012 at 8:56
  • $\begingroup$ This is a good strategy, I will try it and see how it goes. Thank you! $\endgroup$
    – Iasonas
    Jan 16, 2012 at 9:37

I like @nikhil 's answer. I would use the order as the ID, for ease of interpretation. That is 2143 would be the ID for that rank.

But it may be possible to simplify. Are you interested in predicting all of the 24 combinations? Suppose person A ranks the object 2134 and person B ranks them 2143. Do you care? If you only care about which is ranked first, you have only 4 levels; only first and second, 12 levels.

IF this is what you want, it has several advantages:

  1. Smaller required sample size
  2. More precise estimates
  3. Easier interpretation
  • 1
    $\begingroup$ Well, in effect, I would require some sort of aggregation e.g. the "average" ranking for each object... his could give an idea of which is the most popular, without wasting information regarding the third or fourth choice... But thank you for the idea, I think this is a different, but unders certain conditions, a defensible strategy $\endgroup$
    – Iasonas
    Jan 16, 2012 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.