itempersonMap: Visualize item person map and scale properties based on Rasch...

View source: R/itempersonmap.r

itempersonMapR Documentation

Visualize item person map and scale properties based on Rasch model

Description

This function takes a fitted mirt-model and visualizes and plots item-person-map (also known as Kernel-Density Plots or Wright maps) on the left, and add a scale characteristic curve, scale information curve, and a marginal reliability curve on the right.

Usage

itempersonMap(
  model,
  theta_range = c(-4, 4),
  title = "Item Person Map",
  margin = c(1, 0, -1.5, 0),
  density = FALSE,
  color = "red",
  shape = 17,
  size = 3,
  theme = theme_minimal(),
  ...
)

Arguments

model

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

title

title for the plot (defaults to "Item-Person-Map")

margin

margins around the top figure. Sometimes one might want to adjust this.

density

logical value indicating whether a smoothed density curve or a standard histogram should be plotted.

color

color of the geoms, defaults to "red".

shape

can be used to change the shape of the geom, defaults to triangles (17).

size

size of the geom, default to 3.

theme

any ggplot theme.

...

any argument passed to geom_point().

limits

range to be shown on the x-axis

Value

a plot grid as returned by cowplot::plot_grid()

Examples

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

itempersonMap(mod)


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