Produce a diagnostic distractor plot for an item
distractor_plot(dataSrc, item, predicate = NULL, legend = TRUE,
curtains = 10, ...)
Data source: a dexter project db handle or a data.frame with columns: person_id, item_id, response, item_score and optionally booklet_id
The ID of the item to plot. A separate plot will be produced for each booklet that contains the item, or an error message if the item ID is not known. Each plot contains a non-parametric regression of each possible response on the total score.
An optional expression to subset data, if NULL all data is used
logical, whether to include the legend. default is TRUE
100*the tail probability of the sum scores to be shaded. Default is 10. Set to 0 to have no curtains shown at all.
further arguments to plot.
Customization of title and subtitle can be done by using the arguments main and sub.
These arguments can contain references to the variables item_id, booklet_id, item_position(only if dataSrc is a dexter db),
pvalue, rit and rir. References are made by prefixing these variables with a dollar sign. Variable names may be postfixed
with a sprintf style format string, e.g.
distractor_plot(db, main='item: $item_id', sub='Item rest correlation: $rir:.2f')