Skip to contents

The product, over the items, of the probability of the category given, under local independence.

Usage

likelihood_rsm(theta, bank, x, D = 1)

Arguments

theta

Ability.

bank

Matrix of item parameters, one row per item: column 1 is the location of the item \(\lambda_j\), the other columns the thresholds \(\delta_1\) to \(\delta_m\), the same in every row (which makes it the rating scale and not the partial credit model). A 5-point Likert item, scored 0 to 4, needs 5 columns.

x

Vector of the answers, scored 0 to m, one per row of bank.

D

Metric constant, 1 or 1.702.

Value

The likelihood, a number.

Examples

bank <- matrix(c(-0.560, -0.230, 1.559, 0.071, 0.129,
                 rep(1.715, 5), rep(0.461, 5), rep(-1.265, 5), rep(-0.687, 5)),
               nrow = 5,
               dimnames = list(1:5, c("lambdaj", "delta1", "delta2", "delta3", "delta4")))
likelihood_rsm(theta = 0, bank = bank, x = c(4, 3, 2, 1, 0))
#> [1] 2.313671e-05