Given response data that form a connected design, compute the probability to pass on the reference set conditional on each score on one or more target tests.

probability_to_pass(
  dataSrc,
  parms,
  ref_items,
  pass_fail,
  predicate = NULL,
  target_booklets = NULL,
  nDraws = 1000
)

Arguments

dataSrc

a connection to a dexter database, a matrix, or a data.frame with columns: person_id, item_id, item_score

parms

object produced by fit_enorm or a data.frame with columns item_id, item_score and beta. If uncertainty about parameter estimation should be included in the computations, use a `parms` object computed with `method='Bayes'` and nDraws equal or larger than nDraws in probability_to_pass

ref_items

vector with id's of items in the reference set, they must all occur in dataSrc

pass_fail

pass-fail score on the reference set, the lowest score with which one passes

predicate

An optional expression to subset data in dataSrc, if NULL all data is used

target_booklets

The target test booklet(s). A data.frame with columns booklet_id (if multiple booklets) and item_id, if NULL (default) this will be derived from the dataSrc and the probability to pass will be computed for each test score for each booklet in your data.

nDraws

The function uses an Markov-Chain Monte-Carlo method to calculate the probability to pass and this is the number of Monte-Carlo samples used.

Value

An object of type p2pass. Use coef() to extract the probablity to pass for each booklet and score. Use plot() to plot the probabilities, sensitivity and specificity or a ROC-curve.

Details

Note that this function is computationally intensive and can take some time to run, especially when computing the probability to pass for multiple target booklets. Further technical details can be found in a vignette.

See also

The function used to plot the results: plot.p2pass