get_next_item: Index next item

Description Usage Arguments Value

Description

Get the index of the next item to adminster, taking starting (burn in) conditions into account.

Usage

1
2
3
4
5
get_next_item(start_items, information_summary, lp_constraints, lp_characters,
  estimate, model, answers, prior_form, prior_parameters, available,
  administered, number_items, number_dimensions, estimator, alpha, beta,
  guessing, number_itemsteps_per_item, stop_test,
  eap_estimation_procedure = "riemannsum")

Arguments

start_items

List indicating the items that should be shown to the respondent before the theta estimate will be updated for the first time. One of list(type = "random", n = ...), list(type = "fixed", item_keys = ..., n = ...), or list(type = "random_by_dimension", n_by_dimension = ..., n = ...), where n is the total number of burn in items, item_keys is a character vector with keys of the burn in items, and n_by_dimension is the number of burn in items per dimension, or a vector with the number of burn in items for each dimension. If n is 0, only n needs to be defined. Note that the type "random_by_dimension" assumes that items load on a single dimension; if any item has a non-zero loading on a dimension, it is considered to be part of that dimension.

information_summary

How to summarize Fisher information, used for item selection. One of "determinant", "posterior_determinant", "trace", "posterior_trace", or "posterior_expected_kullback_leibler". Fisher Information of the test so far (including all administered items) is added to the Fsher Information of the available item before the summary is computed.

lp_constraints

Data frame with constraints in lp format: the lp_constraints from the list returned by constraints_lp_format. NULL means no constraints.

lp_characters

Data frame with constraint characteristics in lp format: the lp_chars from the list returned by constraints_lp_format. NULL means no constraints.

estimate

Vector containing current theta estimate, with covariance matrix as an attribute.

model

One of "3PLM", "GPCM", "SM" or "GRM", for the three-parameter logistic, generalized partial credit, sequential or graded response model, respectively.

answers

Vector with answers to administered items.

prior_form

String indicating the form of the prior; one of "normal" or "uniform". Not required if estimator is maximum likelihood.

prior_parameters

List containing mu and Sigma of the normal prior: list(mu = ..., Sigma = ...), or the upper and lower bound of the uniform prior: list(lower_bound = ..., upper_bound = ...). Not required if estimator is maximum likelihood. The list element Sigma should always be in matrix form. List elements mu, lower_bound, and upper_bound should always be vectors. The length of mu, lower_bound, and upper_bound should be equal to the number of dimensions. For uniform prior in combination with expected aposteriori estimation, true theta should fall within lower_bound and upper_bound and be not too close to one of these bounds, in order to prevent errors. Setting the shadowcat argument safe_eap to TRUE ensures that the estimation switches to maximum aposteriori if the expected aposteriori estimate fails.

available

vector with indices of yet available items.

administered

Vector with indices of administered items.

number_items

Number of items in test bank.

number_dimensions

Number of dimensions in theta.

estimator

Type of estimator to be used, one of "maximum_likelihood", "maximum_aposteriori", or "expected_aposteriori"; see details.

alpha

Matrix of alpha parameters, one column per dimension, one row per item. Row names should contain the item keys. Note that so called within-dimensional models still use an alpha matrix, they simply have only one non-zero loading per item.

beta

Matrix of beta parameters, one column per item step, one row per item. Row names should contain the item keys. Note that shadowcat expects answer categories to be sequential, and without gaps. That is, the weight parameter in the GPCM model is assumed to be sequential, and equal to the position of the 'location' of the beta parameter in the beta matrix. The matrix should have a number of columns equal to the largest number of item steps over items, items with fewer answer categories should be right-padded with NA. NA values between answer categories are not allowed, and will lead to errors.

guessing

Matrix with one column of guessing parameters per item. Row names should contain the item keys. Optionally used in 3PLM model, ignored for all others.

number_itemsteps_per_item

Vector containing the number of non missing cells per row of the beta matrix

stop_test

List indicating rules for when to terminate the test. Should be a list of the form list(target = ..., max_n = ..., min_n = ..., cutoffs = ...), where target is a vector indicating the maximum acceptable variance per dimension; NULL means no variance target, max_n is the test length at which the test should be terminated (even if the target has not been reached yet), min_n is the minimum test length; NULL means no mimimum test length, and cutoffs is a matrix containing cut off values per dimension (columns) and test iteration (rows). First row contains cut off values for when no items have been administered yet, second row for when one item has been administered, etc. If estimate + 3SE < cutoff for each dimension at a certain iteration, test terminates; NULL means no cut off values.

eap_estimation_procedure

String indicating the estimation procedure if estimator is expected aposteriori and prior form is normal. One of "riemannsum" for integration via Riemannsum or "gauss_hermite_quad" for integration via Gaussian Hermite Quadrature. If prior form is uniform, estimation procedure should always be "riemannsum".

Value

integer item index next item


Karel-Kroeze/ShadowCAT documentation built on May 7, 2019, 12:28 p.m.