## Verbal aggression data
data("VerbalAggression", package = "psychotools")
## Partial credit model for the first other-to-blame
## situation: 'A bus fails to stop for me'
pcm <- PCModel.fit(VerbalAggression$resp[, 1:6])
## Effect plot with modus as cutpoint and custom labels.
lab <- paste(rep(c("Curse", "Scold", "Shout"), each = 2),
rep(c("Want", "Do"), 3 ), sep = "-")
plot(pcm, names = lab)
## Compare the cutpoints (with ylim specified manually)
ylim <- c(-2, 2)
layout(matrix(1:3, ncol = 1))
plot(pcm, type = "mode", main = "Modus as Cutpoint", ylim = ylim)
plot(pcm, type = "median", main = "Median as Cutpoint", ylim = ylim)
plot(pcm, type = "mean", main = "Mean as Cutpoint", ylim = ylim)
## Partial credit model for full VerbalAggression data set
pcm_va <- PCModel.fit(VerbalAggression$resp)
plot(pcm_va)Run the code above in your browser using DataLab