# NOT RUN {
# Simple example
p <- msdprob(c(1.4, -2.2), thresholds = c(-1.1, -0.3, 0.5, 1.7, 2.2))
# Plot probability curves <U+2014> each curve represents the probability of
# rating an item with a given rating category as a function of the
# person measure minus item measure.
x <- seq(-6, 6, 0.1)
p <- msdprob(x, thresholds = c(-3.2, -1.4, 0.5, 1.7, 3.5))
plot(0, 0, xlim = c(-6, 6), ylim = c(0, 1), type = "n",
xlab = "Person minus item measure", ylab = "Probability")
for (i in seq(1, dim(p)[1])){
lines(x, p[i,], type = "l", lwd = "2" , col = rainbow(6)[i])
}
# }
Run the code above in your browser using DataLab