analyzeBlockExclusion {eatATA} | R Documentation |
Analyze block exclusiveness
Description
Use exclusion tuples information to determine which assembled test blocks are exclusive.
Usage
analyzeBlockExclusion(
solverOut,
items,
idCol,
exclusionTuples,
formName = "form"
)
Arguments
solverOut |
Object created by |
items |
Original |
idCol |
Column name in |
exclusionTuples |
|
formName |
A character vector with names to give to the forms. |
Details
If exclusion tuples have been used to assemble test forms (using the itemExclusionConstraint
function), the resulting
item blocks might also be exclusive. Using the initially used item exclusion tuples and the optimal solution
given by useSolver
this function determines, which item blocks are exclusive and can not be together in an
assembled test form.
Value
A data.frame
of block exclusions.
Examples
## Full workflow using itemExclusionTuples
# Example data.frame
items <- data.frame(ID = c("items1", "items2", "items3", "items4"),
exclusions = c("items2, items3", NA, NA, NA),
stringsAsFactors = FALSE)
# Create tuples
exTuples2 <- itemTuples(items = items, idCol = "ID", infoCol = "exclusions",
sepPattern = ", ")
#' ## Create constraints
exclusion_constraint <- itemExclusionConstraint(nForms = 2, itemTuples = exTuples2,
itemIDs = items$ID)
depletion_constraint <- depletePoolConstraint(2, nItems = 4,
itemIDs = items$ID)
target_constraint <- minimaxObjective(nForms = 2,
itemValues = c(3, 1.5, 2, 4),
targetValue = 1,
itemIDs = items$ID)
opt_solution <- useSolver(list(exclusion_constraint, target_constraint,
depletion_constraint))
analyzeBlockExclusion(opt_solution, items = items, idCol = "ID",
exclusionTuples = exTuples2)