ICC_plot: Plot probability and surprisal curves for test or scale...

View source: R/ICC_plot.R

ICC_plotR Documentation

Plot probability and surprisal curves for test or scale items.

Description

ICC_plot plots each item in argument plotindex in turn after functionSbinsmth() has used spline smoothing to estimate item and option characteristic curves.

Usage

  ICC_plot(scrfine, SfdList, dataList, Qvec, 
           binctr=NULL, data_point = FALSE, ci = FALSE, 
           plotType="S", Srng=c(0,5), DSrng=c(-0.2, 0.2), plotindex=1:n, 
           titlestr = NULL, itemscopevec = rep(0, length(plotindex)),  
           plotTitle = TRUE,autoplot = FALSE, plotMissing = TRUE, 
           plotrange=c(min(scrfine),max(scrfine)), shaderange = NULL,  
           ttlsz = NULL, axisttl = NULL, axistxt = NULL, 
           lgdlab = NULL, lgdpos = "bottom")

Arguments

scrfine

A vector of 101 plotting points.

SfdList

A numbered list object produced by a TestGardener analysis of a test. Its length is equal to the number of items in the test or questions in the scale. Each member of SfdList is a named list containing information computed during the analysis.

dataList

A list that contains the objects needed to analyse the test or rating scale.

Qvec

A vector of five marker percentile values. For plotting over information, this is replaced by Qinfovec returned as parmList$Qinfovec.

binctr

A vector of bin center values. If the plot is over arc length or information, binctr is modified before calling Sbinsth_plot by the command binctrinfo = pracma::interp1(indfine, alfine, binctr), and argument binctr is replaced by binctrinfo.

data_point

A logical value indicating whether to plot the data points.

ci

A logical value indicating whether to plot the confidence limits.

plotType

Type(s) of plot, default as "P" for probability, can also be "S" for surprisal, "DS" for sensitivity, and any combination of the three

Srng

A vector of length 2 specifing the plotting range for surprisal values.

DSrng

A vector of length 2 specifing the plotting range for sensitivity values.

plotindex

A vector of indices of items to be plotted.

titlestr

plot title

itemscopevec

A numeric vector containing item scope values.

plotTitle

indicator of showing the plot title, default as TRUE

autoplot

indicator for plotting all items in a batch

plotMissing

Determine if plot the extra option for missing/spoiled responses.

plotrange

A vector of length 2 containing the plot boundaries of the score index interval.

shaderange

a list of length 2 vector(s); set if users want to gray out specific score range(s)

ttlsz

Title font size.

axisttl

Axis title font size.

axistxt

Axis text(tick label) font size.

lgdlab

Legend label font size.

lgdpos

legend position, could be set as "None" to remove the legend.

Value

A list vector is returned which is of the length of argument plotindex. Each member of the vector is a gg or ggplot object for the associated plotindex value. Each plot can be displayed using the print command. The plots of item power are produced as a side value even if no output object is specified in the call to the function.

Author(s)

Juan Li and James Ramsay

References

Ramsay, J. O., Li J. and Wiberg, M. (2020) Full information optimal scoring. Journal of Educational and Behavioral Statistics, 45, 297-315.

Ramsay, J. O., Li J. and Wiberg, M. (2020) Better rating scale scores with information-based psychometrics. Psych, 2, 347-360.

See Also

Sensitivity_plot, Power_plot, Entropy_plot, Sbinsmth

Examples

#  Example 1.  Display the item surprisal curves for the 
#  short SweSAT multiple choice test with 24 items and 1000 examinees
dataList <- Quant_13B_problem_dataList
SfdList  <- Quant_13B_problem_parmList$SfdList
Qvec     <- Quant_13B_problem_parmList$Qvec
binctr   <- Quant_13B_problem_parmList$binctr
infoSurpvec  <- Quant_13B_problem_infoList$infoSurpvec
Qinfovec     <- Quant_13B_problem_infoList$Qinfovec
bininfoctr   <- Quant_13B_problem_infoList$bininfoctr
titlestr <- "Quant_13B_problem"
#  plot the curves for the first question over the score index
oldpar  <- par(no.readonly=TRUE)
indfine <- seq(0,100,len=101)
ICC_plot(indfine, SfdList, dataList, Qvec, binctr, 
         data_point = TRUE, plotType = c("S", "P"), 
         Srng=c(0,4), plotindex=1)
#  plot the curves for the first question over test information
ICC_plot(infoSurpvec, SfdList, dataList, Qinfovec, bininfoctr,
          data_point = TRUE, plotType = c("S", "P"), 
          Srng=c(0,4), plotindex=1)
par(oldpar)

TestGardener documentation built on Nov. 24, 2023, 5:08 p.m.