# rank.L2R: Rank responses under the Bayesian framework according to the... 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 under the Bayesian framework according to the loss function in Method 3 of Wang and Huang (2004).

## Usage

 `1` ```rank.L2R(data,response.number,prior.parameter,e) ```

## 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. `response.number` The number of the responses. `prior.parameter` The parameter vector of the Dirichlet prior distribution, where the vector dimension is 2^response.number. `e` A cut point used in the loss function which depends on the economic costs.

## Value

The rank.L2R returns the estimated probabilities of the responses being selected 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

Wang, H. and Huang, W. H. (2014). Bayesian Ranking Responses in Multiple Response Questions. Journal of the Royal Statistical Society: Series A (Statistics in Society), 177, 191-208.

## See Also

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

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```## This is an example to rank three responses in a multiple response ## question when the number of respondents is 1000 and the value e ## is 0.15. 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.71,0.29))-1 C <-sample.int(2,1000,replace=TRUE,prob=c(0.22,0.78))-1 D <-cbind(A,B,C) data <-matrix(D,nrow=1000,ncol=3) ## or upload the true data response.number <-3 prior.parameter <- c(5,98,63,7,42,7,7,7) e <- 0.15 rank.L2R(data,response.number,prior.parameter,e) ```

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