Skip to contents

This function will create publication worthy Item Response Theory based item characteristic plot using ggplot2 from objects created from mirt pack. Using ggplot2 will enable the user to modify the item characteristic plot.

Usage

ggicc(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 characteristic plot. Output object is a ggplot object.

Examples

data <- tabledown::Rotter[, 11:31]
model <- mirt::mirt(data, model = 1, itemtype = '2PL', SE = TRUE, Se.type = 'MHRM')
#> 
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
#> 
#> Calculating information matrix...

plot <- tabledown::ggicc(model, 1, 3)