runSim: Run CAT simulations

Description Usage Arguments Details Value Examples

View source: R/runSim.R

Description

runSim runs CAT simulations based on the provided configurations and returns the simulation result.

Usage

1
runSim(catConfig, testConfig, simConfig)

Arguments

catConfig

an instance of the S4 class CATConfig for CAT configurations.

testConfig

an instance of the S4 class TestConfig for test specification configuration.

simConfig

an instance of the S4 class SimConfig for test specification configuration.

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

 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)
}

RSCAT documentation built on Oct. 12, 2021, 5:06 p.m.