# Rank responses based on the Generalized score test

### Description

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

### Usage

1 |

### 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 Wangwang@stat.nctu.edu.tw,Yu-Chun Linrestart79610@hotmail.com

### References

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

### See Also

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.