# NOT RUN {
## Load Verbal Aggression data
data("VerbalAggression", package = "psychotools")
## Fit Rasch and partial credit
## model to Verbal Aggression data
rmmod <- raschmodel(VerbalAggression$resp2)
pcmod <- pcmodel(VerbalAggression$resp)
## Category information plots for all items under
## the dichotomous Rasch model
plot(rmmod, type = "information", what = "categories")
## Category information plots for all items under
## the partial credit model
plot(pcmod, type = "information", what = "categories")
## Overlayed item information plots for the first six
## item of the Verbal Aggression data set under
## the partial credit model
plot(pcmod, type = "information", what = "items",
items = 1:6)
## A comparison of the item information for the first six
## items under the dichotomous Rasch and the partial credit model
plot(pcmod, type = "information", what = "items",
items = 1:6, xlim = c(-5, 5))
plot(rmmod, type = "information", what = "items",
items = 1:6, lty = 2, add = TRUE)
legend(x = "topright", legend = c("PCM", "RM"), lty = 1:2, bty = "n")
## A comparison of the test information based on all items
## of the Verbal Aggression data set under the dichotomous Rasch
## and the partial credit model
plot(pcmod, type = "information", what = "test",
items = 1:6, xlim = c(-5, 5))
plot(rmmod, type = "information", what = "test",
items = 1:6, lty = 2, add = TRUE)
legend(x = "topright", legend = c("PCM", "RM"), lty = 1:2, bty = "n")
# }
Run the code above in your browser using DataLab