# NOT RUN {
set.seed(12345)
# This is an example to rank k 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 six lines.
k <- 5
data <- matrix(NA, nrow = 1000, ncol = k)
for(i in 1:k){
p <- runif(1)
data[, i] <- sample(c(0, 1), 1000, p = c(p, 1-p), replace = TRUE)
}
## or upload the true data
rank.wald(data)
# }
Run the code above in your browser using DataLab