As an advanced approach to computerized adaptive testing (CAT), shadow testing (van der Linden, 2005) dynamically assembles entire shadow tests as a part of selecting items throughout the testing process. Selecting items from shadow tests guarantees the compliance of all content constraints defined by the blueprint. RSCAT is an R package for the shadow-test approach to CAT. The objective of RSCAT is twofold: 1) Enhancing the effectiveness of shadow-test CAT simulation; 2) Contributing to the academic and scientific community for CAT research. RSCAT is currently designed for dichotomous items based on the three-parameter logistic (3PL) model. CAT algorithms are implemented in Java and the shadow-test MIP is modeled in FICO Xpress-Mosel. R functions and classes are provided as API wrappers to configure and run CAT simulations in the R environment.
Please note that the RSCAT package depends on Java and the R library “rJava”. The following instructions have been tested on multiple Windows and Mac OS machines. It is not guaranteed that these instructions will work on every machine. You may experience some issues of installing and running Java and rJava, especially on Mac OS. These issues are out of scope of these instructions and the best place to find answers is Dr. Google. Some useful information can be found at (https://zhiyzuo.github.io/installation-rJava/).
install.packages("RSCAT")
to install RSCAT from a CRAN-like repository, ordevtools::install()
to install the RSCAT package. If you get errors like “Error: package or namespace load failed for ‘rJava’:”, try to run Sys.setenv(JAVA_HOME='')
first. If errors still exist, try one of the followings:Sys.setenv(JAVA_HOME = "C:\\Program Files\\Java\\jre1.8.0_201\\bin\\server")
. And run options(devtools.install.args = "--no-multiarch")
.RSCAT depends on the following third party Java libraries, which can be downloaded securely from the Maven Repository through HTTPS:
Copy all the extracted “jar” files to the “/java” folder under the RSCAT package installation directory. You can use .libPaths()
to get the path to installed libraries. For example, if RSCAT is installed at “C:/Users/urname/Documents/R/win-library/3.4”, then copy the extracted “jar” files to “C:/Users/urname/Documents/R/win-library/3.4/RSCAT/java”.
Copy “xprm.jar” to the “/java” folder under the RSCAT package installation directory. “xprm.jar” can be found in the Xpress installation directory, e.g., “C:/xpressmp/lib/xprm.jar”.
In the R environment, load RSCAT using library(RSCAT)
.
sudo R CMD javareconf
. Make sure there are no errors or warnings. If there are, address them and run it again.sudo ln -sf $(/usr/libexec/java_home)/lib/server/libjvm.dylib /usr/local/lib
install.packages("RSCAT")
to install RSCAT from a CRAN-like repository, ordevtools::install()
to install the RSCAT package.sudo ln -s /Applications/FICO\ Xpress/xpressmp/lib/*.dylib /usr/local/lib
.library(RSCAT)
.Refer to the instruction in the RSCAT GitHub repository (https://github.com/act-org/RSCAT).
In the R environment, run library(RSCAT)
to load and attach the package. In the R environment, run launchApp()
to start the Shiny app for CAT configuration and simulation.
Additional settings for environment variables are required for R. Suppose FICO Xpress is installed at /Applications/FICO Xpress/xpressmp. In the R environment, run the following code in R every time before loading/attaching RSCAT:
Sys.setenv(JAVA_LIBRARY_PATH = '/Applications/FICO Xpress/xpressmp/lib')
Sys.setenv(XPRESS='/Applications/FICO Xpress/xpressmp/bin')
Sys.setenv(MOSEL_DSO='/Applications/FICO Xpress/xpressmp/dso')
If RSCAT was loaded previously, run .rs.restartR()
. If not, run library(RSCAT)
to load and attach the package. In the R environment, run launchApp()
to start the Shiny app for CAT configuration and simulation.
The item and passage identifiers should be specified in the column “Item ID” and “Passage ID”, respectively. The item IRT parameters should be specified in the columns “A-Param”, “B-Param”, and “C-Param” in the item pool.
The syntax to define constraints is provided in “/extdata/constraint_syntax.xlsx”.
RSCAT works with MIP solvers that support the nl format, e.g., FICO Xpress, CPLEX, lpsolve, and CBC. The Mosel MIP model uses the “nlsolv” module to support external solvers. RSCAT uses Xpress as the default solver. To switch to another solver, first detach the RSCAT package and restart the R session. Then open the “RSCAT” archive jar file installed under “/java” and edit the Mosel script “/org/act/mosel/shadow_test.mos”. In the Mosel script, the module “mmxprs” is used for Xpress while “nlsolv” is used for other solvers. When “nlsolv” is used, the user needs to set the parameter “nl_solverpath” with the solver installation directory. Additional information for configuring a solver can be obtained from https://www.fico.com/fico-xpress-optimization/docs/dms2018-02/mosel/mosel_solvers/dhtml/nlsolv.html. After editing, save the Mosel file in the JAR archive and reload the package.
van der Linden, W. J. (2005). Linear Models for Optimal Test Design. New York, NY: Springer.