## constraints to make sure that accross test form 1 and 3, only 4 items
## of items 1:10 appear. Note that the constraint should be used in
## in combination with constraining item overlap between the forms.
constr1 <- combineConstraints(
acrossFormsConstraint(nForms = 3,
operator = "=", targetValue = 4,
whichForms = c(1, 3),
itemValues = c(rep(1, 10), rep(0, 10)),
itemIDs = 1:20),
itemUsageConstraint(nForms = 3, nItems = 20, operator = "=", targetValue = 1,
itemIDs = 1:20)
)
## or alternatively
constr2 <- combineConstraints(
acrossFormsConstraint(nForms = 3, nItems = 20,
operator = "=", targetValue = 4,
whichForms = c(1, 3),
whichItems = 1:10,
itemIDs = 1:20),
itemUsageConstraint(nForms = 3, nItems = 20, operator = "=", targetValue = 1,
itemIDs = 1:20)
)
Run the code above in your browser using DataLab