Rank responses of a single response question or a multiple response question by the generalized score test procedure.
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.
The significance level used in the Generalized score test.
type=1 for a single response question ;type=2 for a multiple response question .
The rank.gs returns the estimated probabilities of the responses being selected and the ranks of the responses by the Generalized score procedure.
Wang, H. (2008). Ranking Responses in Multiple-Choice Questions. Journal of Applied Statistics, 35, 465-474.
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)