Learn R Programming

GGUM (version 0.5)

plotCRC: Plot item category response curves (CRCs)

Description

plot.CRC plots item CRCs for the GUM and the GGUM.

Usage

plotCRC(IP, items = NULL, x.lim = 4, ThetaminDelta = TRUE, quiet = FALSE)

Value

The function returns a three-dimensional array with the probabilities associated to each item's CRC. These are the values shown in the plot.

Arguments

IP

Object of class GGUM.

items

Vector indicating the items for which the CRCs are to be plotted. Default is all items.

x.lim

Controls the limits of the x-axis. Default is -4 through +4.

ThetaminDelta

Logical; if TRUE, plot the CRCs centered at 0, otherwise plot the CRCs centered at \(\delta\) (item's difficulty). Default is TRUE.

quiet

Render all plots for items at once? Default is FALSE.

Author

Jorge N. Tendeiro, tendeiro@hiroshima-u.ac.jp

Details

This function plots the item category response curves (CRCs) for the requested items.

Examples

Run this code
# For GUM:
# Generate data:
gen1 <- GenData.GGUM(400, 5, 3, "GUM", seed = 139)
# Fit the GUM:
fit1 <- GUM(gen1$data, 3)
# Plot CRCs:
plotCRC(fit1, items = 1, quiet = TRUE)
if (FALSE) {
# For GGUM:
# Generate data:
set.seed(1); C <- sample(3:5, 10, replace = TRUE)
gen2 <- GenData.GGUM(2000, 10, C, "GGUM", seed = 156)
# Fit the GGUM:
fit2 <- GGUM(gen2$data, C)
# Plot CRCs:
plotCRC(fit2, items = 1, quiet = TRUE)
}

Run the code above in your browser using DataLab