if (FALSE) {
# Example 1: Input choice data and key for the short version of the
# SweSAT quantitative multiple choice test with 24 items and 1000 examinees
# input the choice data as 1000 strings of length 24
# setup the input data list object
dataList <- Quant_13B_problem_dataList
# define the initial examinee indices and bin locations
index <- dataList$percntrnk
indexQnt <- dataList$indexQnt
# Set the number of cycles (default 10 but here 5)
ncycle <- 5
parmListvec <- Analyze(index, indexQnt, ncycle=ncycle, dataList,
verbose=TRUE)
# two column matrix containing the mean fit and arclength values
# for each cycle
HALsave <- matrix(0,ncycle,2)
for (icycle in 1:ncycle) {
HALsave[icycle,1] <- parmListvec[[icycle]]$meanF
HALsave[icycle,2] <- parmListvec[[icycle]]$infoSurp
}
# plot the progress over the cycles of mean fit and arc length
par(mfrow=c(2,1))
plot(1:ncycle, HALsave[,1], type="b", lwd=2,
xlab="Cycle Number",ylab="Mean H")
plot(1:ncycle, HALsave[,2], type="b", lwd=2,
xlab="Cycle Number", ylab="Arc Length")}
Run the code above in your browser using DataLab