c5ml {lazy.mdpref}R Documentation

ML Solution to Thurstone Case V of Paired Comparison Data with logistic probability

Description

ML Solution to Thurstone Case V of Paired Comparison Data with logistic probability

Usage

c5ml(f, n, ij, sname = NULL, minp = 1e-09, lmax = 50, eps = 1e-06,
  print = 1)

Arguments

f

vector of # of times that the left object was preferred.

n

vector of # of trials per pair or scalar .

ij

matrix indicating the stimulus pair: i, j. When sname is NULL the elements of ij will be used as the names.

minp

minimum value of probability when n=1.

lmax

max # of iterations.

eps

criterion for convergence.

print

= 1 to print result.

Details

f_ij is the # of times that sutimulus i is preferred over stimulus j out of n_ij comparisons.
f_ij is assumed to have binomial distribution win n_ij and p_ij
where p_ij = logistic( x_i - x_j ).

Examples

set.seed(1701)
x <- c(-.5,0,1)
ij <- matrix(c(2,1, 3,1, 3,2), 3,2, byrow=1)
ijc <- t( apply(4-ij,1, function(x) paste("s",x,sep="")) )
z <- c(x[2]-x[1], x[3]-x[1], x[3]-x[2])
p <- logistic(z)
n <- c(10,10,10)
f <- mapply( function(size,prob){ rbinom(1,size,prob) }, n, p )
res2 <- c5ml( f, n, ij )
res1 <- c5ml( f, n, ijc, sname=c("s33","s22","s11") )

[Package lazy.mdpref version 0.1.2 Index]