# rank.gs: Rank responses based on the Generalized score test In RankResponse: Ranking Responses in a Single Response Question or a Multiple Response Question

## Description

Rank responses of a single response question or a multiple response question by the generalized score test procedure.

## Usage

 `1` ```rank.gs(data, alpha, type=2) ```

## 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. `alpha` The significance level used in the Generalized score test. `type` type=1 for a single response question ;type=2 for a multiple response question .

## Value

The rank.gs returns the estimated probabilities of the responses being selected and the ranks of the responses by the Generalized score procedure.

## Author(s)

Hsiuying Wang[email protected],Yu-Chun Lin[email protected]

## References

Wang, H. (2008). Ranking Responses in Multiple-Choice Questions. Journal of Applied Statistics, 35, 465-474.

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

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```## This is an example to rank three responses in a multiple response question when ## the number of respondents is 1000 and the significance level is 0.05. 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.21,0.79))-1 B <-sample.int(2,1000,replace=TRUE,prob=c(0.81,0.19))-1 C <-sample.int(2,1000,replace=TRUE,prob=c(0.62,0.28))-1 D <-cbind(A,B,C) data <-matrix(D,nrow=1000,ncol=3) ## or upload the true data alpha<-0.05 rank.gs(data,alpha,2) ```

### Example output

```            [,1]  [,2]  [,3]
probability 0.78 0.193 0.333
rank        1.00 3.000 2.000
```

RankResponse documentation built on May 29, 2017, 11:39 p.m.