probitHLM: Probit Hierarchial Level Model In cIRT: Choice Item Response Theory

Description

Performs modeling procedure for a Probit Hierarchial Level Model.

Usage

 ```1 2 3 4``` ```probitHLM(unique_subject_ids, subject_ids, choices_nk, fixed_effects_design, rv_effects_design, B_elem_plus1, gamma, beta, theta, zeta_rv, WtW, Z_c, Wzeta_0, inv_Sigma_gamma, mu_gamma, Sigma_zeta_inv, S0, mu_beta, sigma_beta_inv) ```

Arguments

 `unique_subject_ids` A `vector` with length N x 1 containing unique subject IDs. `subject_ids` A `vector` with length N*K x 1 containing subject IDs. `choices_nk` A `vector` with length N*K x 1 containing subject choices. `fixed_effects_design` A `matrix` with dimensions N*K x P containing fixed effect variables. `rv_effects_design` A `matrix` with dimensions N*K x V containing random effect variables. `B_elem_plus1` A V[[1]] dimensional column `vector` indicating which zeta_i relate to theta_i. `gamma` A `vector` with dimensions P_1 x 1 containing fixed parameter estimates. `beta` A `vector` with dimensions P_2 x 1 containing random parameter estimates. `theta` A `vector` with dimensions N x 1 containing subject understanding estimates. `zeta_rv` A `matrix` with dimensions N x V containing random parameter estimates. `WtW` A `field` P x P x N contains the caching for direct sum. `Z_c` A `vec` with dimensions N*K x 1 `Wzeta_0` A `vec` with dimensions N*K x 1 `inv_Sigma_gamma` A `matrix` with dimensions P x P that is the prior inverse sigma matrix for gamma. `mu_gamma` A `vector` with length P x 1 that is the prior mean vector for gamma. `Sigma_zeta_inv` A `matrix` with dimensions V x V that is the prior inverse sigma matrix for zeta. `S0` A `matrix` with dimensions V x V that is the prior sigma matrix for zeta. `mu_beta` A `vec` with dimensions P_2 x 1, that is the mean of beta. `sigma_beta_inv` A `mat` with dimensions P_2 x P_2, that is the inverse sigma matrix of beta.

Details

The function is implemented to decrease the amount of vectorizations necessary.

Value

A `matrix` that is an inverse wishart distribution.

A `list` that contains:

`zeta_1`

A `vector` of length N

`sigma_zeta_inv_1`

A `matrix` of dimensions V x V

`gamma_1`

A `vector` of length P

`beta_1`

A `vector` of length V

`B`

A `matrix` of length V

Author(s)

Steven A Culpepper, James J Balamuta

`rwishart` and `TwoPLChoicemcmc`