Creates a new stopping rule for the adaptive test.

new_stopping_rule(f, num_items_in_test = NULL)

Arguments

f

Function of the form function(test_state) {...}, which will be called whenever a new item is about to be administered. test_state is a data frame representing the current status of the adaptive test (items administered, participant responses, etc.). Currently the only method defined for test_state objects is get_num_items_administered; other extractors need to be defined manually.

num_items_in_test

(NULL or integerish scalar) If the number of items in the test is known, providing it in this argument allows it to be used by other test features, e.g. to tell the participant their progress through the test.

Value

An object of class stopping_rule which can be passed to the stopping_rule argument of adapt_test.

Details

A stopping rule defines a condition that is checked each time a new item is about to be administered.