# NOT RUN {
## Load Verbal Aggression data
data("VerbalAggression", package = "psychotools")
## Fit Rasch, rating scale and partial credit
## model to VerbalAggression data
rmmod <- raschmodel(VerbalAggression$resp2)
rsmod <- rsmodel(VerbalAggression$resp)
pcmod <- pcmodel(VerbalAggression$resp)
## Curve plots of the dichotomous RM
plot(rmmod, type = "curves")
## Curve plots under the rating scale model
## for the first six items of the data set
plot(rsmod, type = "curves", items = 1:6)
## Curve plots under the partial credit model
## for the first six items of the data set
## with custom labels
plot(pcmod, type = "curves", items = 1:6,
names = paste("Item", 1:6))
## Compare the predicted probabilities under the rating
## scale model and the partial credit model for a single item
plot(rsmod, type = "curves", item = 1)
plot(pcmod, type = "curves", item = 1, lty = 2, add = TRUE)
legend(x = "topleft", y = 1.0, legend = c("RSM", "PCM"), lty = 1:2, bty = "n")
# }
Run the code above in your browser using DataLab