Calculate log-likelihood
loglik_thirt(gamma, items, persons, resp)a data.frame of length [total binary outcomes] with two variables:
variable pair of the format i-j for item pair ij,
variable gamma for threshold parameters.
a data.frame of length [total items] with five variables:
variable item of the format i for item number i,
variable block of the format b for block number b,
variable dim of the format d for dimension number d,
variable lambda for loadings,
variable psisq for uniqueness,
variable dim for dimensions.
a data.frame of length [number of people] with variables:
variable person of the format p for person number p,
variables named theta_d for dimension number d.
a data.frame of length [n_person x n_block] with at least three first variables:
variable person of the format p for person number p,
variable block of the format b for block number b,
variable resp of the format r for response number r
which corresponds to mupp::find_permutation_index().
a matrix of dimensions [n_person X n_block] of log-likelihoods
of chosen responses for each person for each block.
if (FALSE) {
set.seed(202106)
params <- simulate_thirt_params()
gamma <- params$gamma
items <- params$items
persons <- params$persons
resp <- do.call(simulate_thirt_resp, params)$resp
loglik_thirt(gamma = gamma, items = items, persons = persons, resp = resp)
}