runSim {RSCAT} | R Documentation |
Run CAT simulations
Description
runSim
runs CAT simulations based on the provided configurations and
returns the simulation result.
Usage
runSim(catConfig, testConfig, simConfig)
Arguments
catConfig |
an instance of the S4 class |
testConfig |
an instance of the S4 class |
simConfig |
an instance of the S4 class |
Details
This function calls the Java helper method org.act.util.RHelper.runSim
via rJava to exceute CAT simulation.
Value
the simulation result in the instance of SimResult
.
Examples
if(interactive()){
## Defines item attributes types
itemNumericColumn <- c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE,
FALSE, TRUE, FALSE, TRUE, FALSE, FALSE,FALSE)
## Specifies the item pool file
itemPoolCSVPath <- system.file("extdata", "itempool10Items.csv",
package = "RSCAT")
## Specifies the constraint table file
constraintCSVPath <- system.file("extdata", "constraintSet1.csv",
package = "RSCAT")
## Configures solver parameters
solverConfig <- SolverConfig(absGap = 1e-3, relGap = 1e-3, intTol = 1e-6)
## Configures the EAP estimaition
eapConfig <- EAPConfig(numQuad = 6L, minQuad = -2, maxQuad = 2,
priorDistType = "Normal", distParams = c(0,1))
## Configures CAT
catConfig <- CATConfig(solverConfig = solverConfig,
scoreMethodConfig = scoreMethodConfig(eapConfig), lValue = 3L)
## Configures test specifications
testConfig <- TestConfig(testConfigID = "Test1", testLength = 6L,
itempoolPath = itemPoolCSVPath, constraintPath = constraintCSVPath,
itemNumericColumn = itemNumericColumn)
## Configures the simulation
simConfig <- SimConfig(simID = "Sim1", numExaminees = 8L)
## Runs CAT simulation
simResult <- runSim(catConfig, testConfig, simConfig)
}
[Package RSCAT version 1.1.3 Index]