curveplot: Response Curve Plots for IRT Models

Description Usage Arguments Details See Also Examples

View source: R/graphics.R

Description

Base graphics plotting function for response curve plot visualization of IRT models.

Usage

1
2
3
4
  curveplot(object, ref = NULL, items = NULL, names = NULL,
    layout = NULL, xlim = NULL, ylim = c(0, 1), col = NULL,
    lty = NULL, main = NULL, xlab = "Latent trait",
    ylab = "Probability", add = FALSE, ...)

Arguments

object

a fitted model object of class "raschmodel", "rsmodel" or "pcmodel".

ref

argument passed over to internal calls of predict.

items

character or numeric, specifying the items for which response curves should be visualized.

names

character, specifying labels for the items.

layout

matrix, specifying how the response curve plots of different items should be arranged.

xlim, ylim

numeric, specifying the x and y axis limits.

col

character, specifying the colors of the response curve lines. The length of col should be the maximum number of available categories.

lty

numeric, specifying the line type of the response curve lines. The length of lty should either be one or the maximum number of available categories. In the first case, a single line type is used for all category response curves. In the latter case, separate line types for each category response curve are used.

main

character, specifying the overall title of the plot.

xlab, ylab

character, specifying the x and y axis labels.

add

logical. If TRUE, new response curves are added to an existing plot. Only possible when a single item is visualized.

...

further arguments passed to internal calls of matplot

Details

The response curve plot visualization illustrates the predicted probabilities as function of the ability parameter θ under a certain IRT model. This type of visualization is sometimes also called item/category operating curves or item/category characteristic curves.

See Also

regionplot, profileplot, infoplot, piplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## 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")

Example output



psychotools documentation built on May 17, 2018, 9:04 a.m.