get_probs_and_likelihoods_per_item: Probabilities and likelihoods

Description Usage Arguments Value

Description

Per item, get probabilities of scoring in each answer category given theta, likelihood for the actually chosen answer category, and derivatives.

Usage

1
2
get_probs_and_likelihoods_per_item(theta, model, alpha, beta, guessing,
  answers = numeric(0), with_likelihoods)

Arguments

theta

Vector with true or estimated theta.

model

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

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.

answers

If with_likelihoods is set to TRUE, vector with answers to all items included in alpha, beta, and guessing; else, numeric(0).

with_likelihoods

If FALSE, only the probability matrix for all answer categories for all items is returned. If TRUE, the likelihoods for the actually chosen answer categories and derivatives are also returned.

Value

If with_likelihoods, list with probability matrix, likelihoods and derivatives. Else, only the probability matrix.


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