Description Usage Arguments Details Value Examples
runSim
runs CAT simulations based on the provided configurations and
returns the simulation result.
1 | runSim(catConfig, testConfig, simConfig)
|
catConfig |
an instance of the S4 class |
testConfig |
an instance of the S4 class |
simConfig |
an instance of the S4 class |
This function calls the Java helper method org.act.util.RHelper.runSim
via rJava to exceute CAT simulation.
the simulation result in the instance of SimResult
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.