# rank.btnr: Rank responses based on the Bradley-Terry model with... 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 Newton-Raphson method. This method associates each response with a value 'gamma', and use this value to rank responses.

## Usage

 `1` ```rank.btnr(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.btnr returns the associated values in the first line and the ranks of the responses in the second line.

## Author(s)

Hsiuying Wangwang@stat.nctu.edu.tw,Yu-Chun Linrestart79610@hotmail.com

## References

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

`rank.btmm`,`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.btnr(data) ```

### Example output

```              1        2         3
gamma 0.5464894 0.163857 0.2896536
rank  1.0000000 3.000000 2.0000000
```

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