Skip to contents

Displays the Item Characteristic Curves (ICCs) for all items, showing the probability of a correct response as a function of ability. Requires ggplot2.

Usage

dpmirt_plot_icc(fit, items = NULL, theta_range = c(-4, 4), n_points = 201, ...)

Arguments

fit

A dpmirt_fit object from dpmirt.

items

Integer vector of item indices to plot. Default: all items (up to 10).

theta_range

Numeric vector of length 2 for the ability axis range. Default: c(-4, 4).

n_points

Integer. Number of grid points. Default: 201.

...

Currently unused.

Value

A ggplot object.

Details

The ICC gives the probability of a correct response at each ability level:

Rasch: \(P(\theta) = \mathrm{logistic}(\theta - \beta)\)

2PL: \(P(\theta) = \mathrm{logistic}(\lambda(\theta - \beta))\)

3PL: \(P(\theta) = \delta + (1 - \delta) \cdot \mathrm{logistic}(\lambda(\theta - \beta))\)

Examples

if (FALSE) { # \dontrun{
sim <- dpmirt_simulate(200, 20, model = "rasch", seed = 42)
fit <- dpmirt(sim$response, model = "rasch", prior = "normal",
              niter = 5000, nburnin = 1000, seed = 123)
dpmirt_plot_icc(fit)
dpmirt_plot_icc(fit, items = 1:5)
} # }