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 useSolver function.

items

Original data.frame containing information on item level.

idCol

Column name in items containing item IDs. These will be used for matching to the solver output.

exclusionTuples

data.frame with two columns, containing tuples with item IDs which should be in test forms exclusively. Must be the same object as used in itemExclusionConstraint.

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)



[Package eatATA version 1.1.2 Index]