On Bayesian modeling of censored data in JAGS
Related Experiment Video
Updated: Sep 29, 2025

An R-Based Landscape Validation of a Competing Risk Model
Published on: September 16, 2022
Xinyue Qi1, Shouhao Zhou2, Martyn Plummer3
1The University of Texas MD Anderson Cancer Center, Houston, TX, USA.
Background:
Just Another Gibbs Sampling (JAGS) is a convenient tool to draw posterior samples using Markov Chain Monte Carlo for Bayesian modeling. However, the built-in function dinterval() for censored data misspecifies the default computation of deviance function, which limits likelihood-based Bayesian model comparison.
Results:
To establish an automatic approach to specifying the correct deviance function in JAGS, we propose a simple and generic alternative modeling strategy for the analysis of censored outcomes. The two illustrative examples demonstrate that the alternative strategy not only properly draws posterior samples in JAGS, but also automatically delivers the correct deviance for model assessment. In the survival data application, our proposed method provides the correct value of mean deviance based on the exact likelihood function. In the drug safety data application, the deviance information criterion and penalized expected deviance for seven Bayesian models of censored data are simultaneously computed by our proposed approach and compared to examine the model performance.
Conclusions:
We propose an effective strategy to model censored data in the Bayesian modeling framework in JAGS with the correct deviance specification, which can simplify the calculation of popular Kullback-Leibler based measures for model selection. The proposed approach applies to a broad spectrum of censored data types, such as survival data, and facilitates different censored Bayesian model structures.
Related Concept Videos
Censoring Survival Data
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Model Approaches for Pharmacokinetic Data: Distributed Parameter Models
The distributed parameter models are specifically designed to account for variations and differences in some drug classes. This model is particularly useful for assessing regional concentrations of anticancer or...
Statistical Methods for Analyzing Epidemiological Data
Mechanistic Models: Compartment Models in Individual and Population Analysis
Assumptions of Survival Analysis

