Skip to contents

This function will create publication worthy Item Response Theory based item information plot. using ggplot2 from objects created from mirt pack.

Usage

ggiteminfo(model, item, theta)

Arguments

model

A mirt package fitted object.

item

Item number (i.e. 1,2,3,4).

theta

Theta range. Put only one number. Theta =3 will be considered as theta range (-3 to 3).

Value

A publication quality item information plot.Output object is a ggplot object.

Examples

data <- tabledown::Rotter[, 11:31]
model <- mirt::mirt(data, model = 1, itemtype = '2PL')
#> 
Iteration: 1, Log-Lik: -5444.747, Max-Change: 0.56424
Iteration: 2, Log-Lik: -5374.008, Max-Change: 0.30858
Iteration: 3, Log-Lik: -5357.722, Max-Change: 0.17532
Iteration: 4, Log-Lik: -5353.406, Max-Change: 0.09162
Iteration: 5, Log-Lik: -5352.045, Max-Change: 0.06068
Iteration: 6, Log-Lik: -5351.603, Max-Change: 0.03828
Iteration: 7, Log-Lik: -5351.412, Max-Change: 0.01627
Iteration: 8, Log-Lik: -5351.383, Max-Change: 0.01187
Iteration: 9, Log-Lik: -5351.371, Max-Change: 0.00751
Iteration: 10, Log-Lik: -5351.365, Max-Change: 0.00390
Iteration: 11, Log-Lik: -5351.364, Max-Change: 0.00344
Iteration: 12, Log-Lik: -5351.363, Max-Change: 0.00026
Iteration: 13, Log-Lik: -5351.363, Max-Change: 0.00024
Iteration: 14, Log-Lik: -5351.363, Max-Change: 0.00109
Iteration: 15, Log-Lik: -5351.363, Max-Change: 0.00081
Iteration: 16, Log-Lik: -5351.363, Max-Change: 0.00031
Iteration: 17, Log-Lik: -5351.363, Max-Change: 0.00011
Iteration: 18, Log-Lik: -5351.363, Max-Change: 0.00054
Iteration: 19, Log-Lik: -5351.363, Max-Change: 0.00012
Iteration: 20, Log-Lik: -5351.363, Max-Change: 0.00035
Iteration: 21, Log-Lik: -5351.363, Max-Change: 0.00010

plot <- ggiteminfo(model, 1, 3)