knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
eatATA
efficiently translates test design requirements for Automated Test Assembly (ATA
) into constraints for a Mixed Integer Linear Programming Model (MILP). A number of efficient and user-friendly functions are available that translate conceptual test assembly constraints to constraint objects for MILP solvers, like the GLPK
solver. In the remainder of this vignette we will illustrate the use of eatATA
using a minimal example. A general overview over eatATA
can be found in the vignette Overview of eatATA
Functionality.
The eatATA
package can be installed from CRAN
.
install.packages("eatATA")
First, eatATA
is loaded into your R
session. In this vignette we use a small simulated item pool, items_mini
. The goal will be to assemble a single test form consisting of ten items, an average test time of eight minutes and maximum TIF
at medium ability. We therefore calculate the IIF
at medium ability and append it to the item pool using the calculateIFF()
function.
# loading eatATA library(eatATA) # item pool structure str(items_mini) # calculate and append IIF items_mini[, "IIF_0"] <- calculateIIF(B = items_mini$difficulty, theta = 0)
In Table 1 you can see the first five items of the item pool.
# create content bounderies in advance knitr::kable(items_mini[1:5,], digits = 3, caption = "Table 1. First 5 Items of the Item Pool")
Next, the objective function is defined: The TIF
should be maximized at medium ability. For this, we use the maxObjective()
function.
testInfo <- maxObjective(nForms = 1, itemValues = items_mini$IIF, itemIDs = items_mini$item)
Our further, fixed constraints are defined as additional constraint objects.
itemNumber <- itemsPerFormConstraint(nForms = 1, operator = "=", targetValue = 10, itemIDs = items_mini$item) itemUsage <- itemUsageConstraint(nForms = 1, operator = "<=", targetValue = 1, itemIDs = items_mini$item) testTime <- itemValuesDeviationConstraint(nForms = 1, itemValues = items_mini$time, targetValue = 8 * 60, allowedDeviation = 5, relative = FALSE, itemIDs = items_mini$item)
Alternatively, we could determine the appropriate test time based on the item pool using the autoItemValuesMinMax()
function.
testTime2 <- autoItemValuesMinMaxConstraint(nForms = 1, itemValues = items_mini$time, testLength = 10, allowedDeviation = 5, relative = FALSE, itemIDs = items_mini$item)
To automatically assemble the test form based on our constraints, we call the useSolver()
function. In this function we define which solver should be used as back end. As a default solver, we recommend GLPK
, which is automatically installed alongside this package.
solver_out <- useSolver(list(itemNumber, itemUsage, testTime, testInfo), solver = "GLPK")
The solution can be inspected directly via inspectSolution()
or appended to the item pool via appendSolution()
. Using the inspectSolution()
function an additional row is created that calculates the column sums for all numeric variables.
inspectSolution(solver_out, items = items_mini, idCol = "item")
appendSolution(solver_out, items = items_mini, idCol = "item")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.