Skip to contents

Compares the response probabilities of the engine with those of the fitted mirt model, item by item, so that a sign or mapping mistake does not go unnoticed (a check on the first item alone passes either way, since mirt fixes c = 0 there). Items are matched by name: make.names() of the question must be the item name in the model. Needs the mirt package.

Usage

validate_item_bank_against_mirt(
  bank_scale,
  mirt_model,
  thetas = seq(-4, 4, 0.5),
  tol = 1e-06
)

Arguments

bank_scale

The rows of one scale of an item bank read with read_item_bank.

mirt_model

The mirt model fitted to that scale.

thetas

Ability values at which the probabilities are compared.

tol

Largest difference accepted.

Value

The largest difference, invisibly; a warning when it is above tol.

See also

Examples

if (FALSE) { # \dontrun{
bank <- read_item_bank("items.csv")
validate_item_bank_against_mirt(bank[bank$scale == "Openness", ], model_openness)
} # }