p_thirtC: Calculate probability

View source: R/probability.R

p_thirtCR Documentation

Calculate probability

Description

Calculate the probability of all potential response patterns for each respondent using C++

Usage

p_thirtC(gamma, items, persons, picked_order = NULL)

Arguments

gamma

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.

items

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.

persons

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.

picked_order

a data.frame of length ⁠[person x block]⁠ with four 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 order number r which follows mupp::find_all_permutation orders, variable seq which includes the items in ranked order by each person. data.frame similar to output in simulate_thirt_resp()$resp

Value

a list of length ⁠[block]⁠ of matrices with dimension ⁠[person X permutation]⁠ of probabilities for each response pattern per block.


nguyenllpsych/thirt documentation built on Feb. 14, 2024, 10:53 p.m.