# Compute a grid of values of the objective function for locating each
# examinee or respondent for the 24-item short form of the SweSAT
# quantitative test on the percentile score index continuum [0,100].
chcemat <- Quant_13B_problem_dataList$chcemat
SfdList <- Quant_13B_problem_parmList$SfdList
index <- Quant_13B_problem_parmList$index
n <- ncol(chcemat)
# Fitting function for the first examinee
j <- 1
chcevec <- as.numeric(chcemat[j,])
Fcurve1 <- Fcurve(SfdList, chcevec, 0)
# First derivative of the fitting function for the first examinee
DFcurve1 <- Fcurve(SfdList, chcevec, 1)
# Second derivative of the fitting function for the first examinee
D2Fcurve1 <- Fcurve(SfdList, chcevec, 2)
oldpar <- par(no.readonly=TRUE)
par(mfrow=c(3,1))
indfine <- seq(0,100,len=101)
plot(indfine, Fcurve1, type="l", xlab="", ylab="Fitting curve",
main="Examinee 1")
plot(indfine, DFcurve1, type="l", xlab="", ylab="First derivative")
points(index[1], 0, pch="o")
abline(0,0,lty=2)
plot(indfine, D2Fcurve1, type="l",
xlab="Score index", ylab="Second derivative")
abline(0,0,lty=2)
points(index[1], 0, pch="o")
par(oldpar)
Run the code above in your browser using DataLab