Learn R Programming

psychotools (version 0.2-0)

plot.PCModel: Visualizing Partial Credit Models

Description

Base graphics plotting function for partial credit models.

Usage

## S3 method for class 'PCModel':
plot(x, type = NULL, names = NULL, ref = NULL,
  main = NULL, ylab = "Latent trait", ylim = NULL, off = 0.1, ...)

Arguments

x
an object of class "PCModel".
type
character, specifying which type of threshold parameters are used to mark the category regions per item in the plot (see details below).
names
character vector containing x-axis labels for the items. If set to NULL (the default), these are generated.
ref
a vector of labels or position indices of item parameters which should be used as restriction/for normalization. If NULL (the default), all items are used (sum zero restriction).
main
character, specifying the overall title of the plot.
ylab
label for the y axis.
ylim
y axis limits.
off
the distance (in scale units) between two item rectangles.
...
further arguments passed to plot

Details

The effect plots visualization implemented here was already used by Van der Linden and Hambleton (1997) in the context of IRT and has been called "effect plots" by Fox & Hong (2009). In our implementation, these plots show, dependent on the choosen type of threshold parameters, different regions for the categories of an item over the theta axis. If type is set to "modus", the cutpoints correspond to the threshold parameters and the rectangles mark the theta regions where a category is most probable. If type is set to "median", the cutpoints correspond to the point on the theta axis, where the cumulative probability to score in category x or higher is 0.5. If set to "mean", the cutpoints correspond to the point on the theta axis where the expected score is exactly between two categories, i.e. 0.5 for a dichotomous item.

If there are unordered threshold parameters, the location of the original threshold parameters are indicated by red dashed lines.

References

Fox, J. & Hong, Jangman. (2009). Effect Displays in R for Multinomial and Proportional-Odds Logit Models: Extensions to the effects Package. Journal of Statistical Software, 32(1), http://www.jstatsoft.org/v32/i01/

Van der Linden, W. J. & Hambleton, R. K. (1997). Handbook of Modern Item Response Theory. Springer, New York.

See Also

PCModel.fit

Examples

Run this code
## 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