Learn R Programming

mixRasch (version 1.1)

itemFitPlot: Function for producing item difficulty by fit statistic plots.

Description

This function produces item difficulty and fit statistic plots for Rasch calibrated items estimated using the mixRasch procedure.

Usage

itemFitPlot(raschResult, itemSet, useItemNames = TRUE, fitStat = "infit", plotTitle="Item Fit Plot", xlab, ylab, xlim, ylim, refLines, col = c("black","white"), colTheme, gDevice, file)

Arguments

raschResult
A mixRasch object, where n.c = 1 (i.e., no mixture models).
itemSet
An optional vector of item names or item positions for plotting subsets of items.
useItemNames
If TRUE, then item names are used. If false item numbers are used.
fitStat
The item fit statistic ("infit", "outfit", "in.Z", "out.Z") used in the plot.
plotTitle
Controls the main plot title.
xlab
The label for the x axis.
ylab
The label for the y axis.
xlim
A vector overriding default limits for the x axis.
ylim
A vector overriding default limits for the y axis.
refLines
A vector overriding the default lower and upper reference lines that define the region of rejection.
col
A vector of the colors to be used in the plot. The first color will be used for item labels. The second color will be used for shading the area of rejection.
colTheme
Four color themes ("cavaliers", "dukes", "spartans", "greys") are provided. If you provide a color theme, it will override the col paramater.
gDevice
Controls graphics device. Options are "screen" (default), "jpg", or "png".
file
The name of the output file if a device other than "screen" is chosen.

Details

The function produces an item difficulty by item fit plot. Items are plotted using either their names or their test position (see useItemNames). Lower and upper reference line are drawn (see refLines) that help identify misfitting items. For infit and outfit, default reference lines are drawn at .7 and 1.3. For in.Z and out.Z, default reference lines are drawn at -2 and +2. Using col or colTheme, the region beyond the reference line may be shaded.

Examples

Run this code

# Example data included with mixRasch
data(exRasch)

rasch1 <- mixRasch(exRasch,1,50, conv.crit=.0001, n.c=1)

# Default Fit Plot
itemFitPlot(rasch1)

# Using Outfit and a color theme
itemFitPlot(rasch1, fitStat="outfit", colTheme="spartans")

Run the code above in your browser using DataLab