Learn R Programming

mixRasch (version 1.1)

personItemPlot: Function for producing back-to-back histograms of item and person distributions.

Description

This function will enable you to make back-to-back histograms of the item and person distributions estimated using the mixRasch procedure.

Usage

personItemPlot(raschResult, nBreaks=15, plotTitle="Person Item Histogram", xlab = "Relative Frequency", ylab = "Ability", col = c("darkgrey","lightgrey"), colTheme, makeLegend=TRUE, legendLabels=c("items", "people"), legendLoc="bottomleft", gDevice, file)

Arguments

raschResult
A mixRasch object, where n.c = 1 (i.e., no mixture models).
nBreaks
The number of bins to be used in creating the histograms.
plotTitle
The title to be used on the plot.
xlab
The label for the x axis.
ylab
The label for the y axis.
col
A vector of the colors to be used in the plot. The first color will be used for items. The second color will be used for people.
colTheme
Four color themes ("cavaliers", "dukes", "spartans", "greys") are provided. If you provide a color theme, it will override the col paramater.
makeLegend
Controls whether a legend for the is colors used in the plot.
legendLabels
A vector that allows for customized legend labels.
legendLoc
Allows placement of the legend in different location. Uses the same discriptions as the standard legend function.
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 a standard person and item back-to-back histogram. These plots are only appropriate for standard Rasch models (i.e., not multiple-class mixture models). When used with polytomous model results, the item difficulty is based on the overall (average) step difficulty for each polytomous item.

Examples

Run this code

# Example data included with mixRasch
data(SimMix)

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

personItemPlot(rasch1)

Run the code above in your browser using DataLab