npp: Non-parametric characteristic curves

Description Usage Arguments Author(s) References See Also Examples

View source: R/nonpar.R

Description

A plotting routine producing non-parametric analogues of the IRF not unlike those in Jim Ramsay's TestGraf program. The curves are produced by a kernel binomial regression of the actual responses to an item on some estimates of the latent variable, by courtesy of package sm.

Usage

1
2
3
  npp(resp, x, items, from = -4, to = 4, co = 1,
    main = "Non-parametric response function", add = FALSE,
    bands = FALSE, label = FALSE)

Arguments

resp

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

x

The values of the latent variable ("ability") for the same persons whose responses are given in resp. If not given, function qrs will be plugged in, which is the approach of TestGraf

items

An index to the items (columns of resp) to be shown on the plot. If not given, all items will be plotted.

from

Lower limit for ability on the plot. Default is -4.

to

Upper limit for ability on the plot. Default is 4.

add

When add=T, the curve is added to a plot, otherwise a new plot is started. Default is F.

main

The main title of the plot, given that add=F.

co

The colour of the curves. Default is 1 for black. Use co=NA to plot each curve in a different colour.

bands

When bands=T, confidence bands are added.

label

When label=T, individual curves will be labeled with the item number.

Author(s)

Ivailo Partchev

References

James O. Ramsay (2000). TestGraf: A program for the graphical analysis of multiple choice test and questionnaire data. McGill University, Montreal, Canada

See Also

qrs, irf, plot.irf

Examples

1
2
3
4
5
6
# plot items 1:5 in different colours, label
npp(Scored, items=1:5, co=NA, label=TRUE)

# For item 7, compare npp with the 2PL parametric IRF
npp(Scored, items=7, bands=TRUE)
plot(irf(ip=Scored2pl$est[7,]), co=3, add=TRUE)

lebebr01/irtoys-2 documentation built on May 20, 2019, 11:29 p.m.