Date: 2025-09-26

# Package Overview

#### 2025-09-26

# Intro

The package is a companion to the paper “A hierarchical model for accuracy and choice on standardized tests” in Psychometrika written by Culpepper, S. A. & Balamuta, J. J. Within this package, we make available the code used for the analysis within the paper as well as the data.

# Functions

The package provides C++ implementations of the hierarchical bayesian modeling framework for choice. The primary functions that are novel contributions to psychometric literature are the `probitHLM()` and `TwoPLChoicemcmc()` that respectively provide a choice inclusive Probit HLM and a Two Parameter Ogive Model and are called by an overall wrapper function `cIRT()`. These functions do have an overall dependency on other components that have also been coded within C++ and may benefit a practitioner seeking to do use the same functionality elsewhere.

- Random Number Generation for the following distributions: Wishart `rwishart()`, Inverse Wishart `riwishart()`, and Multivariate Normal `rmvnorm()`.
- Matrix Centering `center_matrix()`
- Direct Sum calculation `direct_sum()`
- Generation of Observed Data from Choice Model `Generate_Choice()`
- Tabulate Total Scores `Total_Tabulate()`.

# Data

Over the course of Spring and Fall 2014, we deployed a testing client based on the Revised Purdue Spatial Visualization Test (Revised PSVT:R) by Yoon, 2011 within an experimental psychology lab. Subjects were presented individual questions that challenged their spatial reasoning. The question pairings were generating by bracketing different levels of difficulty together. The paper provides more details on the pairing generation. After the pair was answered individually, it was then presented to the student so that they could select the item they believe was corrected. We include the data that was collected from the students as follows:

- Student Performance on Revised Purdue Spatial Visualization Test (Revised PSVT:R) by Yoon, 2011 are located in `trial_matrix`
- The choices students made among items presented to them are in `choice_matrix`
- The end payout results for students based on their choices are in `payout_matrix`
- One additional data set exists containing the student’s sex response are in `survey_data`