dmall | R Documentation |
This function calculates the density of observation(s) under a Mallows distribution.
dmall(rankings, pi0, theta, log = FALSE)
rankings |
A matrix of rankings, potentially with attribute "assignments" to signify separate reviewer assignments. One ranking per row. |
pi0 |
A vector specifying the consensus (modal probability) ranking; should be used only for tie-breaking
equal values in |
theta |
A numeric entry specifying the Mallows scale parameter. |
log |
A boolean indicating if the log likelihood should be returned. |
A numeric value indicating the (log) likelihood of rankings under a Mallows distribution.
rankings1 <- matrix(c(1,2,3,3,1,2),nrow=2,byrow=TRUE)
rankings2 <- matrix(c(1,2,3,4,2,3,NA,NA),nrow=2,byrow=TRUE)
attr(rankings2,"assignments") <- matrix(c(rep(TRUE,4),FALSE,TRUE,TRUE,TRUE),nrow=2,byrow=TRUE)
dmall(rankings=c(1,2,3,NA),pi0=c(1,2,3,4),theta=2)
dmall(rankings=rankings1,pi0=c(1,2,3),theta=2)
dmall(rankings=rankings2,pi0=c(1,2,3,4),theta=3,log=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.