# rank.btmm: Rank responses based on the Bradley-Terry model with the MM... In RankResponse: Ranking Responses in a Single Response Question or a Multiple Response Question

## Description

Adopt the Bradley-Terry model to rank responses in a single response question or in a multiple response question with the MM method. This method associates each response with a value 'gamma', and use this value to rank responses.

## Usage

 `1` ```rank.btmm(data) ```

## Arguments

 `data` A m x n matrix dij, where dij = 0 or 1. If the ith respondent selects the jth response, then dij = 1, otherwise dij = 0.

## Value

The rank.btmm returns the associated values in the first line and the ranks of the responses in the second line.

## Author(s)

Hsiuying Wang wang@stat.nctu.edu.tw,Yu-Chun Lin restart79610@hotmail.com

## References

Hunter DR (2004). MM algorithms for generalized Bradley-Terry models. The Annals of Statistics, 32, 384-406.

`rank.btnr`,`rank.btqn`,`rank.L2R`,`rank.LN`,`rank.gs`,`rank.wald`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```## This is an example to rank three responses in a multiple response question when ## the number of respondents is 1000. In this example, we do not use a real data, ## but generate data in the first three lines. A <-sample.int(2,1000,replace=TRUE,prob=c(0.37,0.63))-1 B <-sample.int(2,1000,replace=TRUE,prob=c(0.65,0.35))-1 C <-sample.int(2,1000,replace=TRUE,prob=c(0.5,0.5))-1 D <-cbind(A,B,C) data <-matrix(D,nrow=1000,ncol=3) ## or upload the true data rank.btmm(data) ```

### Example output

```              1         2        3
gamma 0.5674794 0.1538526 0.278668
rank  1.0000000 3.0000000 2.000000
```

RankResponse documentation built on May 2, 2019, 9:15 a.m.