# Example 1. Display the item power curves for the
# short SweSAT multiple choice test with 24 items and 1000 examinees
# Assemble information for estimating index density
indfine <- seq(0,100,len=101)
SfdList <- Quant_13B_problem_parmList$SfdList
index <- Quant_13B_problem_parmList$index
N <- length(index)
# Define the density for only interior index values
inside <- index > 0 & index < 100
indexdens <- index[inside]
logdensbasis <- fda::create.bspline.basis(c(0,100), 15)
index_distnList <- index_distn(index[inside], logdensbasis)
denscdf <- as.numeric(index_distnList$denscdf)
indcdf <- as.numeric(index_distnList$indcdf)
# adjusted marker score index values are computed by interpolation
markers <- c(.05, .25, .50, .75, .95)
Qvec <- pracma::interp1(denscdf, indcdf, markers)
result <- density_plot(indexdens, c(0,100), Qvec)
Run the code above in your browser using DataLab