rmb {rankrate}R Documentation

Random Mallows-Binomial generation

Description

This function randomly generates rankings and ratings from a Mallows-Binomial distribution.

Usage

rmb(I, p, theta, M, pi0 = NULL, R = NULL)

Arguments

I

A numeric entry indicating the number of observations to be drawn, i.e., the number of judges providing rankings and ratings.

p

A vector specifying the underlying object qualities. All values between be between 0 and 1, inclusive.

theta

A numeric entry specifying the Mallows scale parameter.

M

A numeric entry specifying the maximum integer rating.

pi0

A vector specifying the consensus (modal probability) ranking; should be used only for tie-breaking equal values in p.

R

A numeric entry specifying the length of the rankings to be drawn. When R<=length(p), partial rankings are drawn by definition.

Value

A list containing elements ratings, a matrix of integer ratings with one row per judge and one column per object, rankings, and matrix of rankings (orderings) with one row per judge, and M, the inputted maximum integer rating.

Examples

rmb(I=5,p=c(.1,.3,.4,.7,.9),theta=1,M=10)
rmb(I=10,p=c(.1,.3,.3,.7,.9),pi0=c(1,3,2,4,5),theta=5,M=40,R=3)


[Package rankrate version 1.2.0 Index]