tracePlot: Plotting item characteristics curves

View source: R/tracePlot.r

tracePlotR Documentation

Plotting item characteristics curves

Description

This function takes a fitted mirt-model and the underlying data and visualizes item characteristic curves.

Usage

tracePlot(
  model,
  items = NULL,
  theta_range = c(-4, 4),
  title = "Item Characteristics Curves",
  n.answers = 5,
  facet = TRUE,
  legend = FALSE
)

Arguments

model

an object of class SingleGroupClass returned by the function mirt().

items

numerical vector indicating which items to plot (currently does not yet work for graded response models).

theta_range

range to be shown on the x-axis

title

title for the plot (defaults to "Item Characteristic Curves")

n.answers

In a graded response model, number of answer options (e.g., 5-point scale = 5)

facet

Should all items be shown in one plot, or each item received its individual facet?

Value

a ggplot

Examples

library(mirt)
library(ggmirt)
data <- expand.table(LSAT7)
(mod <- mirt(data, 1))

tracePlot(mod)
tracePlot(mod, items = c(1,2,3), theta_range = c(-5,5), facet = F, legend = T)


masurp/ggmirt documentation built on Oct. 14, 2023, 1:16 p.m.