irtoys (version 0.2.1)

irfPlot: Item fit plot

Description

Produces a plot that compares the estimated trace line (item response function) for an item with the data. The data is represented with a non-parametric trace line computed as in tgf (not npp). Approximate confidence intervals for the parametric line are also shown.

Usage

irfPlot(resp, ip, x = NULL, item,
  main = "Parametric vs non-parametric trace line", use.sm = FALSE)

Arguments

resp

A matrix of responses: persons as rows, items as columns, entries are either 0 or 1, no missing data

ip

Item parameters: the object returned by function est -- note that the complete object is required since the standard errors play an important part.

x

A vector of abilities, as long as there are persons, against which to plot probabilities of a correct response. Normally these would be the output of qrs, and these are provided by default when x is NULL. However, the user may want to use something else, or pass the same qrs output to several plots (various calls to qrs provide slightly different output because of the random breaking of ties.)

item

The item for which a plot is requested (column of resp).

main

The main title of the plot.

use.sm

When TRUE, empirical data will be shown with a regression estimated by sm, otherwise the Bayes theorem will be used. Default is FALSE.

Details

Comparing the outputs of npp and irf has at least two drawbacks: (i) package sm is used as a black box, and (ii) the confidence intervals are drawn around the data (even though represented by the nonparametric regression) rather than the parametric curve. In this function, the parametric curve is shown in red, with a 68 The non-parametric curve representing the data is shown in black. It is computed by applying Bayes theorem to the density of ability. The standard error of the parametric curve is computed by applying the delta theorem on the standard error of the item parameters, as computed by the underlying software (currently only available with ICL).

See Also

irf, npp, tgf

Examples

Run this code
# NOT RUN {
# a plot for item 5 
irfPlot(Scored, ip=b3, item=4)

# }

Run the code above in your browser using DataLab