# Modeling truncated and censored data with the diffusion model in Stan

**Authors:** Franziska Henrich, Karl Christoph Klauer

PMC · DOI: 10.3758/s13428-025-02822-z · Behavior Research Methods · 2026-01-20

## TL;DR

This paper introduces a method in Stan to analyze censored or truncated reaction time data using Bayesian diffusion models, improving accuracy in psychological studies.

## Contribution

The paper adds functionality to Stan for modeling truncated and censored data using the diffusion model's cumulative distribution function.

## Key findings

- Recovery studies showed strong correlations (r = .93–1.00) and coverage (93–95%) for true values.
- Simulation-based calibration confirmed the method's correctness.
- Reanalysis of existing datasets validated the new approach.

## Abstract

Reaction time data in psychology are frequently censored or truncated. For example, two-alternative forced-choice tasks that are implemented with a response window or response deadline give rise to censored or truncated data. This must be accounted for in the data analysis, as important characteristics of the data, such as the mean, standard deviation, skewness, and correlations, can be strongly affected by censoring or truncation. In this paper, we use the probabilistic programming language Stan to analyze such data with Bayesian diffusion models. For this purpose, we added the functionality to model truncated and censored data with the diffusion model by adding the cumulative distribution function for reaction times generated from the diffusion model and its complement to the source code of Stan. We describe the usage of the truncated and censored models in Stan, test their performance in recovery and simulation-based calibration, and reanalyze existing datasets with the new method. The results of the recovery studies are satisfactory in terms of correlations (\documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym} 
				\usepackage{amsfonts} 
				\usepackage{amssymb} 
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$$r=.93 - 1.00$$\end{document}r=.93-1.00), coverage (93–95% of true values lie in the 95% highest density interval), and bias. Simulation-based calibration studies suggest that the new functionality is implemented without errors. The reanalysis of existing datasets further validates the new method.

## Full-text entities

- **Diseases:** CCDF (MESH:D012090)
- **Chemicals:** NA (MESH:D012964)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12819533/full.md

## Figures

34 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12819533/full.md

## References

14 references — full list in the complete paper: https://tomesphere.com/paper/PMC12819533/full.md

---
Source: https://tomesphere.com/paper/PMC12819533