generate_tirt_stan_syntax: Generate Stan Syntax and Data for TIRT Models

View source: R/generate_tirt_stan_syntax.R

generate_tirt_stan_syntaxR Documentation

Generate Stan Syntax and Data for TIRT Models

Description

Automatically reduces logical dependencies for full rank data (Heister et al. 2025), handles missing/MOLE data natively, and generates Stan syntax capable of within-chain parallelization (reduce_sum).

Usage

generate_tirt_stan_syntax(
  pairwise_data,
  n_blocks,
  block_size,
  n_traits,
  key_matrix,
  trait_col,
  key_col,
  apply_heister = TRUE
)

Arguments

pairwise_data

Dataframe of binary outcomes.

n_blocks

Integer. Number of blocks.

block_size

Integer. Number of items per block.

n_traits

Integer. Number of traits.

key_matrix

A data.frame indicating item trait and item sign.

trait_col

Character string. The name of the column in key_matrix indicating the trait measured by the item.

key_col

Character string. The name of the column in key_matrix indicating the keying direction of the item (e.g., positive/negative).

apply_heister

Logical. Apply logical dependency reduction? Defaults to TRUE.

Value

A list containing syntax (Stan code) and data (List for rstan).


autoFC documentation built on July 14, 2026, 5:07 p.m.