EmpiricalICCfit: Create a ggplot of empirical item characteristic curves...

View source: R/EmpiricalICCfit.R

EmpiricalICCfitR Documentation

Create a ggplot of empirical item characteristic curves compared to theoretical relationship based on the model

Description

The empirical item characteristic curve plots the mean scores on each item for groups with different total scores on the whole test.

Usage

EmpiricalICCfit(mirtobj, itenum, which.items = NULL, ngroups = 1)

Arguments

mirtobj

An estimated IRT model (of class SingleGroupClass) estimated either using mirt or unimirt.

itenum

A numeric input denoting which item the plot should be produced for.

which.items

A numeric vector denoting which items should be used to create the total test score. By default all available items are included.

ngroups

The number of groups to split the cohort into in order to produce the empirical points on the curve (the mean total score in each group is plotted against the mean item score). Setting ngroups=1 (the default and the exception to the usual pattern) will create one group for each possible total test score.

Value

A list with the following elements.

plot1

A function that translates any vector of scores on form X into equivalent scores on form Y.

modelchartdat

A data frame giving the expected relationship between total score and mean item score based on the IRT model

empiricalchartdat

A data frame giving the empirical results within each group

#'

Examples

## Not run: 
mirt1=mirt(mathsdata,1)
EICC=EmpiricalICCfit(mirt1,1)
EICC
EICC$plot1
EmpiricalICCfit(mirt1,1,ngroups=10)$plot1

## End(Not run)

CambridgeAssessmentResearch/unimirt documentation built on June 10, 2025, 6:03 a.m.