# Example 1. Display the test information curve for the
# short SweSAT multiple choice test with 24 items and 1000 examinees
# plot a two-dimension version of manifold curve
SfdList <- Quant_13B_problem_parmList$SfdList
index <- Quant_13B_problem_parmList$index
arclength <- Quant_13B_problem_parmList$arclength
Results <- Spca(SfdList, nharm=2, rotate=TRUE)
varprop <- Results$varpropvarmx
titlestr <- "SweSAT problem items"
oldpar <- par(no.readonly=TRUE)
on.exit(oldpar)
Spca_plot(Results$harmvarmxfd, nharm=2, titlestr)
print("Proportions of variance accounted for and their sum:")
print(round(100*c(varprop,sum(varprop)),1))
# plot a three-dimension version of manifold curve
SfdList <- Quant_13B_problem_parmList$SfdList
index <- Quant_13B_problem_parmList$index
arclength <- Quant_13B_problem_parmList$arclength
Results <- Spca(SfdList, nharm=3, rotate=TRUE)
varprop <- Results$varpropvarmx
Spca_plot(Results$harmvarmxfd, nharm=3, titlestr)
print("Proportions of variance accounted for and their sum:")
print(round(100*c(varprop,sum(varprop)),1))
Run the code above in your browser using DataLab