ORIGINAL RESEARCH article

Front. Appl. Math. Stat., 09 July 2026

Sec. Statistics and Probability

Volume 12 - 2026 | https://doi.org/10.3389/fams.2026.1821648

Bayesian estimation of log-linear Poisson models: analytic and MCMC approaches with applications to reliability and medical count data

  • Department of Public Health, College of Health Sciences, Saudi Electronic University, Riyadh, Saudi Arabia

Abstract

Introduction:

In reliability engineering and biomedical research, event information is often recorded as counts within fixed time intervals rather than exact event times. Log-linear Poisson models provide a principled framework for modeling such count data through covariate-dependent intensity functions.

Methods:

This study develops a Bayesian formulation of the Poisson regression model using weakly informative priors and compares analytic and simulation-based approaches for posterior estimation, including Laplace approximation and several Markov Chain Monte Carlo (MCMC) methods. The proposed framework is illustrated using a system reliability dataset and a medical event-count dataset. Posterior summaries, convergence diagnostics, prior sensitivity analysis, and posterior predictive checks were employed to assess estimation performance and model adequacy.

Results:

The results demonstrate that Laplace approximation produces estimates comparable to full MCMC methods for moderate sample sizes. Posterior estimates, convergence diagnostics, and model adequacy assessments showed strong agreement across Bayesian computational approaches.

Discussion:

Simulation-based methods offer greater flexibility for more complex settings and provide a useful benchmark for validating analytic approximations. The findings support the application of Bayesian log-linear Poisson models as a reliable framework for analyzing count data in reliability and medical research.

1 Introduction

In reliability engineering and biomedical research, event information is often recorded as counts observed within fixed time intervals rather than as exact event times. Examples include the number of system component failures per month, or the number of clinical events observed during follow-up. Such type of data often arise from reporting practices or monitoring systems that aggregate events over time. When events occur independently within short intervals and the probability of occurrence in a small subinterval is low, the Poisson distribution provides a natural modeling framework for failure and event counts (, , , ).

The primary objective of this work is to develop a Bayesian approach for log-linear Poisson regression models in which the event intensity depends on covariates through a log-link function. Within this framework, regression parameters are assigned weakly informative priors to provide regularization while avoiding overly restrictive assumptions. Weakly informative priors are particularly useful when prior knowledge is limited but complete noninformativeness may lead to instability in estimation (, , ).

Because posterior distributions for Poisson regression models do not admit closed-form solutions, Bayesian inference requires numerical approximation. This study compares analytic and simulation-based computational approaches for posterior estimation. Specifically, Laplace approximation is used as a deterministic second-order approximation to the posterior density (), while simulation-based methods include Independent Metropolis sampling, Gibbs sampling (, , , ), and Hamiltonian Monte Carlo implemented through the No-U-Turn Sampler (). These approaches represent different strategies for exploring posterior distributions and differ in computational efficiency and accuracy.

All methods are implemented within the R environment (), using LaplacesDemon for Laplace approximation and Independent Metropolis sampling (), R2jags for Gibbs sampling (, , , ), and RStan for Hamiltonian Monte Carlo (). Prior sensitivity analysis is conducted to evaluate the influence of prior specification on posterior inference, and posterior predictive checks are used to assess model adequacy and the plausibility of the Poisson modelling assumptions (, ).

The methodology is illustrated using two datasets: a system component reliability dataset involving monthly failure counts and a medical event-count dataset related to metastasis occurrence. The goal is not to introduce a new probabilistic model, but to provide a structured comparison of Bayesian computational approaches for log-linear Poisson models and to assess their empirical agreement, stability, and practical suitability across distinct applied domains.

The remainder of the paper is organized as follows. Section 2 presents the Poisson regression model and Bayesian formulation. Section 3 describes the computational methods. Section 4 reports the empirical results for the two applications. Section 5 discusses diagnostic assessment and model validation, and Section 6 concludes with a discussion of findings and limitations.

2 The Poisson model

This section presents the log-linear Poisson regression model, its likelihood formulation, and the associated Bayesian framework. These elements form the basis for the computational approaches examined in this study, including Laplace approximation, Independent Metropolis sampling, Gibbs sampling, and Hamiltonian Monte Carlo via the No-U-Turn Sampler.

2.1 The model and likelihood

Let for denote observed event counts within fixed time intervals. We assume:

With probability mass function.

Here, represents the expected event count for observation . To ensure positivity and incorporate covariate effects, a log-link function is adopted:

Where is the design matrix and is the vector of regression coefficients.

The likelihood for the full dataset is:

When deriving the posterior distribution, the factorial terms do not depend on and can be absorbed into the proportionality constant (Gelman et al., 2013). The likelihood kernel is therefore.

This log-linear formulation accommodates both reliability failure counts and medical event counts within a unified modeling framework.

2.2 Bayesian framework

Bayesian inference proceeds by combining the likelihood with prior distributions for the regression coefficients. By Bayes’ theorem,

Weakly informative Normal priors are assigned to the regression parameters to provide regularization without imposing strong prior structure (, , , , ). For centered and scaled predictors, we consider priors of the form.

Where is chosen large enough to avoid undue influence while stabilizing computation (, ).

The resulting posterior distribution does not admit a closed-form expression due to the non-conjugacy introduced by the log-link. Consequently, marginal posterior distributions and posterior expectations require numerical approximation.

2.3 Computational methods

Bayesian inference for the log-linear Poisson model reduces to evaluating integrals that are analytically intractable (). We therefore consider both analytic approximation and simulation-based methods.

2.3.1 Laplace approximation

The Laplace approximation provides a second-order Taylor expansion of the log-posterior density around its mode, yielding a Gaussian approximation centered at the maximum a posteriori estimate (, ). This deterministic approach is computationally efficient and often accurate when the posterior is unimodal and approximately symmetric (, ). Its performance depends on the curvature of the log-posterior and is most reliable in moderate to large samples ().

2.3.2 Markov chain Monte Carlo methods

Markov Chain Monte Carlo (MCMC) methods generate dependent samples from the posterior distribution using a Markov chain whose stationary distribution is the target posterior (, , , ). In this study, we implement Independent-Metropolis (IM) sampling and Gibbs sampling to explore the posterior distribution under the same likelihood and prior specifications (, ).

Independent Metropolis relies on a fixed proposal distribution, while Gibbs sampling draws sequentially from full conditional distributions when available. These methods are flexible but may exhibit slow mixing in higher-dimensional or highly correlated parameter spaces.

2.3.3 Hamiltonian Monte Carlo and the no-U-turn sampler

Hamiltonian Monte Carlo (HMC) improves sampling efficiency by incorporating gradient information from the log-posterior to suppress random-walk behavior (); (Gelman et al., 2013). The No-U-Turn Sampler (NUTS) adaptively selects trajectory length and step size, eliminating the need for manual tuning and improving robustness (Hoffman and Gelman, 2014). This method is particularly effective for higher-dimensional regression models.

2.4 Prior sensitivity and posterior predictive assessment

Because prior specification can influence posterior inference, especially in smaller samples, we conduct prior sensitivity analysis by varying prior scale parameters and examining the resulting posterior summaries. Stability across specifications indicates that inference is primarily data-driven and robust to reasonable prior choices.

Model adequacy is assessed using posterior predictive checks, in which replicated datasets are generated from the posterior predictive distribution and compared with observed data (Gelman et al., 2013). Discrepancies between simulated and observed summaries provide evidence of potential model misspecification.

3 Datasets: empirical applications and simulation study

The proposed Bayesian log-linear Poisson framework is illustrated using two applications: a system component reliability dataset and a medical event-count dataset. All analyses were conducted in R using the packages LaplacesDemon, R2jags, and RStan to implement the analytic and simulation-based estimation procedures described in Section 2.

3.1 System component reliability data

The first dataset, referred to as the System Component Reliability (SCR) data, is obtained from SAS Institute Inc. (). The data record the monthly number of maintenance removals for a complex system over a four-year period (1987–1990). The system consists of numerous components that periodically fail and are replaced or repaired. During the observation period, the system operated under approximately steady conditions.

The response variable is the monthly count of component removals, modeled as a Poisson-distributed outcome. The observed counts are presented in Table 1. The discrete nature of the data distribution is illustrated in Figure 1.

Table 1

YearMonthRemovalsYearMonthRemovalsYearMonthRemovals
198712198724198733
198743198753198768
198772198786198793
1987109198711419871210
198814198826198834
198844198853198865
198873198884198895
198810319881161988123
198912198926198931
198945198955198964
198972198982198992
1989105198911119891210
1990131990281990312
199047199053199062
199074199083199090
199010619901161990126

System component reliability data (monthly removals).

Figure 1

The discrete nature and moderate variability of the counts make this dataset suitable for illustrating Bayesian Poisson regression in a reliability setting.

3.2 Medical event-count data

The second application considers medical count data motivated by lung cancer progression, where the response variable represents the number of metastasis events observed for a patient. Covariates include demographic and clinical characteristics such as age, gender, tumor size, smoking history, cancer stage, and treatment type.

Because access to real individual-level clinical data is restricted, a simulated dataset was generated using a log-linear Poisson model with clinically plausible parameter values. This controlled structure allows evaluation of Bayesian estimation procedures in a multivariable medical setting. A sample of the dataset is shown in Table 2.

Table 2

AgeGenderTumor sizeSmokingStageTreatmentMetastasis count
55Male5.1YesIChemo1
70Female6.3NoIIINone0
68Male4.7YesIVRadiation3
63Female3.9NoIISurgery2
72Male5.6YesIChemo1
66Female6.1NoIIINone2

Sample of the simulated lung cancer dataset.

The dataset includes both continuous and categorical covariates: patient age and tumor size (continuous), gender and smoking history (binary), cancer stage (I–IV), and treatment type (Chemo, Radiation, Surgery, or None). The response variable is the number of metastasis events, modelled as a Poisson-distributed count.

The presence of both continuous and categorical predictors produces a higher-dimensional regression structure than in the reliability example, allowing assessment of computational efficiency across estimation methods.

4 Bayesian implementation and results

4.1 Bayesian analysis of system’s components reliability data

The monthly number of component removals, denoted by , is modeled within the unified log-linear Poisson regression framework introduced earlier. For month , the outcome satisfies.

With conditional mean.

This specification defines a generalized linear model with canonical log link, where the intercept corresponds to the baseline category (Year 1987, Month 1), the year indicators measure inter-annual deviations, and the month indicators capture seasonal variation. The same likelihood structure (as defined in sec. 2) and prior specification are retained across all computational strategies to ensure methodological consistency.

Independent weakly informative priors are assigned as:

Which allow the data to dominate posterior inference while maintaining numerical stability (, , , ). Because the posterior distribution does not admit a closed-form solution, both analytic and simulation-based approximation methods are applied.

Before applying full posterior computation, preliminary fit was obtained using the bayesglm function from the arm package in R (). This provides rapid approximate posterior summaries (Table 3) under Student- priors and serves as a diagnostic starting point rather than the primary inferential method used for comparison.

Table 3

ParametersCoef.estCoef.sez-valuePr (>|z|)
(Intercept)1.18290.27814.25340.0000
Factor (year) 1988−0.12850.1922−0.66870.5037
Factor (year) 1989−0.23310.1977−1.17900.2384
Factor (year) 19900.05270.18360.28730.7739
Factor (month) 20.67160.32362.07540.0379
Factor (month) 30.49000.33541.46130.1439
Factor (month) 40.43910.33901.29550.1952
Factor (month) 50.13770.36340.37890.7048
Factor (month) 60.43910.33901.29550.1952
Factor (month) 7−0.09770.3866−0.25270.8005
Factor (month) 80.20550.35740.57490.5653
Factor (month) 9−0.18990.3968−0.47860.6322
Factor (month) 100.62910.32621.92880.0538
Factor (month) 110.32900.34730.94730.3435
Factor (month) 120.86070.32302.74990.0060

Preliminary Bayesian fit using bayesglm.

Although informative, these estimates indicate moderate seasonal effects and relatively small year-to-year differences. However, these summaries rely on asymptotic normal approximations and do not represent the full posterior inference targeted in this study.

A model matrix was constructed to implement the Bayesian estimation procedures in LaplacesDemon, JAGS, and Stan. The same likelihood and prior specification were retained across all computational approaches to ensure methodological.

4.1.1 Bayesian estimation using Laplace approximation method

The Laplace approximation provides a deterministic second-order approximation to the posterior density (, ).

Where the likelihood arises directly from the log-linear Poisson specification and the prior is Gaussian. A second-order Taylor expansion of around its posterior mode yields:

Where is the negative Hessian matrix of the log-posterior. Optimization was performed using the limited-memory BFGS algorithm within the LaplacesDemon package. This approach produces posterior modes and curvature-based credible intervals derived directly from the log-linear Poisson likelihood.

Table 4 presents the posterior summaries obtained via Laplace approximation. A clear graphical summary of these results illustrated in Figure 2.

Table 4

ParametersModeSDLBUB
β₀ (Intercept)1.08470.24000.60481.5647
β₁ (1988)−0.13100.1937−0.51840.2564
β₂ (1989)−0.23640.1994−0.63510.1623
β₃ (1990)0.05130.1891−0.31880.4215
γ₂ (Feb)0.77980.29460.19051.3690
γ₃ (Mar)0.59740.3084−0.01941.2143
γ₄ (Apr)0.54610.3126−0.07911.1714
γ₅ (May)0.24080.3412−0.44150.9231
γ₆ (Jun)0.54610.3126−0.07911.1713
γ₇ (Jul)−0.00040.0163−0.03290.0321
γ₈ (Aug)0.30980.3343−0.35880.9783
γ₉ (Sep)−0.09570.3810−0.85780.6666
γ₁₀ (Oct)0.73720.29770.14181.3326
γ₁₁ (Nov)0.43490.3224−0.20981.0797
γ₁₂ (Dec)0.96900.28220.40461.5334

Posterior summary via Laplace approximation.

Figure 2

The approximation yields stable posterior modes and symmetric credible intervals, consistent with a unimodal posterior structure.

4.1.2 Bayesian estimation using independent Metropolis (IM) algorithm

Full simulation-based inference was conducted using the Independent Metropolis (IM) algorithm implemented in LaplacesDemon. The proposal distribution was centered near the Laplace mode to improve efficiency. The IM algorithm targets the same posterior density defined by the log-linear Poisson likelihood and Normal priors.

The observed acceptance rate of 0.49 falls within the recommended efficiency range for Metropolis-type samplers (), indicating adequate mixing.

The resulting posterior summaries (Table 5) closely align with the Laplace approximation, validating the analytic results (see Figure 3).

Table 5

ParameterMeanSDMCSEESSLBMedianUB
β₀ (intercept)1.06090.3290.01337550.3611.0811.658
β₁ (1988)−0.13770.1960.00611,000−0.522−0.1320.257
β₂ (1989)−0.23820.1960.00611,000−0.610−0.2460.142
β₃ (1990)0.04680.1850.00571,000−0.3070.0470.406
γ₂ (Feb)0.77410.3780.01607560.0600.7821.492
γ₃ (Mar)0.59010.3750.0140864−0.1260.5921.320
γ₄ (Apr)0.54320.3870.0151863−0.2260.5471.281
γ₅ (May)0.21380.3940.0150833−0.5510.2260.948
γ₆ (Jun)0.54940.3830.0148774−0.1860.5411.297
γ₇ (Jul)−0.03640.4260.0166776−0.853−0.0320.764
γ₈ (Aug)0.29090.4160.0158817−0.4790.2771.131
γ₉ (Sep)−0.13090.4360.0158842−1.029−0.1280.674
γ₁₀ (Oct)0.74000.3720.01518200.0730.7321.525
γ₁₁ (Nov)0.43560.3890.0146807−0.3340.4231.197
γ₁₂ (Dec)0.97970.3630.01458230.3030.9661.729
Deviance211.02935.5070.1870830202.183210.318223.613
LP−171.11022.7540.0935830−177.402−170.754−166.686

Posterior summary via independent metropolis.

Figure 3

4.1.3 Bayesian estimation using Gibbs sampling (JAGS)

The model was re-expressed in JAGS using the same likelihood structure:

With and normal priors for .

Gibbs sampling iteratively draws from full conditional distributions implied by the joint posterior of the log-linear Poisson model (, , ). Convergence was assessed using the potential scale reduction factor (, ), with all parameters satisfying . Convergence diagnostics indicate stable mixing and posterior estimates consistent with both Laplace and Independent Metropolis results. Table 6 represents the full posterior summary via Gibbs sampling using JAGS language (see Figure 4).

Table 6

ParameterMeanSD2.5%50%97.5%Rhatn.eff
β₀ (Intercept)1.0270.3280.3321.0481.6141.0013,100
β₁ (1988)−0.1290.198−0.514−0.1320.2591.0013,100
β₂ (1989)−0.2330.195−0.623−0.2300.1471.0013,100
β₃ (1990)0.0150.186−0.3050.0470.4171.0013,100
γ₂ (Feb)0.8080.3730.0890.8081.5621.0013,100
γ₃ (Mar)0.6200.386−0.1060.6081.4061.0013,100
γ₄ (Apr)0.5700.379−0.1390.5611.3301.0013,100
γ₅ (May)0.2460.404−0.5120.2431.0761.0013,100
γ₆ (Jun)0.5690.381−0.1470.5551.3481.0013,100
γ₇ (Jul)0.0040.434−0.8260.0040.8631.0013,100
γ₈ (Aug)0.3230.406−0.4540.3211.1241.0013,100
γ₉ (Sep)−0.0940.457−1.017−0.0900.7881.0013,100
γ₁₀ (Oct)0.7620.3710.0520.7481.5321.0013,100
γ₁₁ (Nov)0.4500.390−0.3000.4521.2241.0021,100
γ₁₂ (Dec)1.0040.3610.3490.9861.7481.0013,100
deviance211.0338.392202.147210.172223.3271.0013,100

Posterior summary via Gibbs sampling.

Figure 4

4.1.4 Bayesian estimation using Hamiltonian Monte Carlo (NUTS) sampler (Stan)

Hamiltonian Monte Carlo leverages gradient information from the log-posterior to reduce random-walk behavior (); (Gelman et al., 2013). The No-U-Turn Sampler (NUTS) adaptively tunes trajectory length and step size (Hoffman and Gelman, 2014), improving efficiency in higher dimensions. The gradient of the log-posterior,

Is computed directly from the log-linear Poisson likelihood and Normal priors, enabling efficient exploration of the posterior surface. Four parallel chains were run in Stan, and all parameters achieved .

Posterior summaries (Table 7) are nearly identical to those obtained from the other MCMC methods, confirming consistency across computational strategies (see Figure 5).

Table 7

ParameterMeanSD2.5%50%97.5%n.effRhat
β₀ (Intercept)1.0990.2830.5151.1121.6379741.002
β₁ (1988)−0.1220.196−0.502−0.1240.2653,4031.001
β₂ (1989)−0.2300.204−0.639−0.2300.1593,8211.001
β₃ (1990)0.0600.190−0.3110.0600.4373,4201.001
γ₂ (Feb)0.7210.3340.0740.7201.3761,2881.000
γ₃ (Mar)0.5370.342−0.1390.5371.2081,4011.001
γ₄ (Apr)0.4850.346−0.1940.4841.1571,3931.001
γ₅ (May)0.1740.369−0.5630.1730.8711,6181.001
γ₆ (Jun)0.4860.343−0.1800.4831.1591,3141.001
γ₇ (Jul)−0.0770.393−0.853−0.0740.6671,6841.000
γ₈ (Aug)0.2440.366−0.4640.2470.9651,4891.002
γ₉ (Sep)−0.1700.400−0.971−0.1620.60617531.000
γ₁₀ (Oct)0.6810.3360.0440.6821.3421,2911.001
γ₁₁ (Nov)0.3730.358−0.3380.3721.0681,5061.000
γ₁₂ (Dec)0.9170.3160.3140.9131.5381,1861.001
lp__106.5672.850100.159106.976111.10420401.000

Posterior summary via NUTS sampler using RStan.

Figure 5

4.1.5 Comparative assessment

Across all four methods—Laplace approximation, Independent Metropolis, Gibbs sampling, and Hamiltonian Monte Carlo—the posterior summaries are highly consistent. The Laplace method provides a fast deterministic approximation (), while IM and Gibbs sampling confirm its accuracy through stochastic simulation (Robert and Casella, 2010). Hamiltonian Monte Carlo offers improved efficiency and scalability, particularly relevant for more complex multivariable extensions.

The strong agreement across analytic and simulation-based methods directly supports the study objective by demonstrating empirical equivalence across Bayesian computational strategies for well-behaved Poisson posteriors.

4.2 Bayesian analysis of simulated lung cancer data

The lung cancer dataset was generated under a log-linear Poisson regression structure to evaluate Bayesian estimation performance in a multivariable medical setting.

Let denote the number of metastasis events observed for patient . The outcome is modeled as:

With log-link specification.

Baseline categories are Female, Stage I, and No Treatment. Under this parameterization, each coefficient represents a multiplicative change in the expected metastasis rate through the relationship , holding other covariates constant. Continuous predictors such as age and tumor size act linearly on the log scale, while categorical predictors induce relative rate shifts.

The simulated dataset was generated with a prespecified sample size of and with covariates drawn from distributions chosen to reflect a clinically plausible lung cancer setting. Specifically, age was generated from a normal distribution with mean 65 and standard deviation 10, tumor size was generated from a uniform distribution on [2, 8], whereas gender and smoking status were generated from Bernoulli distributions, stage was generated from a four-category multinomial distribution, and treatment was generated from a categorical distribution with four levels. The true regression coefficients used in the simulation were fixed at β = (−1.5, 0.02, 0.10, 0.15, 0.20, 0.30, 0.50, 0.70, 0.20, 0.40, 0.10), which were selected to produce interpretable metastasis rates and moderate separation among the predictor effects. The data were generated under the standard Poisson assumption without additional overdispersion, so that the simulation reflects the intended Poisson regression structure rather than a mis specified count model.

To assess the stability of the Bayesian estimators, the single simulated dataset was analyzed using the four estimation strategies considered in this study. Because the purpose of this section is to provide an objective benchmark with known parameter values, the simulated data allow direct assessment of estimator accuracy, uncertainty estimation, and computational efficiency.

The same likelihood,

And prior specifications.

Are maintained to ensure comparability with the reliability analysis. The simulation design was intended to provide an objective benchmark because the true parameter values are known in advance. This allows comparison of posterior estimates, uncertainty measures, and computational efficiency across methods under controlled conditions.

As the posterior distribution does not admit a closed-form solution, the same four estimation strategies were also implemented for the lung cancer data set: Laplace approximation, Independent Metropolis sampling, Gibbs sampling, and Hamiltonian Monte Carlo (NUTS). All four methods target the same posterior distribution but differ in approximation mechanism, mixing behavior, and computational efficiency.

For each simulated dataset, we recorded posterior means, posterior standard deviations, credible intervals, convergence diagnostics, and wall-clock computation time.

The simulation results were summarized using bias, root mean squared error, empirical coverage probability, average interval width, maximum absolute difference in posterior means, relative error in standard deviations, and effective sample size for the MCMC methods.

These summaries provide a reproducible basis for comparing the accuracy and efficiency of the four Bayesian estimation approaches under a controlled Poisson regression setting with known parameter values.

4.2.1 Bayesian estimation using Laplace approximation method

Posterior modes indicate that tumor size, advanced cancer stage, and chemotherapy are strong positive determinants of metastasis counts. Age shows a modest positive association, while gender and smoking effects are comparatively smaller. The intercept is negative, reflecting a low baseline metastasis intensity under reference conditions. Table 8 reports full posterior summaries.

Table 8

ParameterModeSDLBMedianUB
β₀ (intercept)−1.4400.321−1.657−1.657−0.716
β₁ (age)0.0220.0050.0120.0250.025
β₂ (gender)0.2440.0570.1470.2350.347
β₃ (tumor size)0.1240.0130.0890.1290.138
γ₂ (smoking)0.3010.0530.1880.2810.397
γ₃ (stage II)0.2300.1200.0120.1870.535
γ₄ (stage III)0.2350.0950.0420.2230.480
γ₅ (stage IV)0.6220.1060.3750.6700.734
γ₆ (chemo)−0.0570.150−0.358−0.0870.245
γ₇ (radiation)0.1480.113−0.1450.1450.338
γ₈ (surgery)0.1670.164−0.2690.1860.380
Deviance405.4153.458403.570403.727412.733
LP−263.4731.729−267.132−262.629−262.550

Posterior summary using Laplace approximation method (lung cancer data).

The table reports posterior summaries for one simulated dataset; additional simulation replications are summarized separately in the revised simulation-design subsection.

4.2.2 Bayesian estimation using independent-Metropolis algorithm

Simulation-based posterior mean closely match the Laplace modes. Uncertainty estimates are moderately larger, particularly for stage and treatment effects, reflecting full posterior exploration rather than local curvature approximation (see Table 9, Figure 6).

Table 9

ParameterMeanSDLBMedianUB
β₀ (intercept)−1.3890.468−2.255−1.407−0.475
β₁ (age)0.0200.0060.0090.0200.031
β₂ (gender)0.2640.1080.0510.2590.478
β₃ (tumor size)0.1190.0300.0600.1190.178
γ₂ (smoking)0.3430.1060.1290.3450.540
γ₃ (stage II)0.3130.180−0.0390.3100.674
γ₄ (stage III)0.2440.171−0.0850.2420.584
γ₅ (stage IV)0.5880.1590.2840.5820.900
γ₆ (chemo)0.0350.172−0.2790.0300.373
γ₇ (radiation)0.2600.158−0.0410.2590.586
γ₈ (surgery)0.1830.165−0.1320.1810.525
Deviance408.7474.521401.735408.406419.602
LP−265.1392.260−270.567−264.968−261.633

Posterior summary via independent metropolis (lung cancer data).

Figure 6

4.2.3 Bayesian estimation using Gibbs sampler via JAGS

The Gibbs-based posterior summaries remain highly consistent with the Independent Metropolis results. Convergence diagnostics indicate stable chains, and credible intervals confirm the dominant effects of tumor size, stage progression, and chemotherapy (see Table 10, Figure 7).

Table 10

ParameterEstimateSD2.5%25%Median75%97.5%Rhatn.eff
β₀ (intercept)−1.4240.458−2.316−1.742−1.416−1.113−0.5391.0021700
β₁ (age)0.0200.0060.0090.0160.0200.0240.0321.007300
β₂ (gender)0.2760.1110.0620.1990.2730.3500.4981.0012,200
β₃ (TumorSize)0.1190.0300.0620.0990.1180.1390.1771.004610
γ₂ (smoking)0.3400.1040.1350.2700.3390.4130.5451.004640
γ₃ (stage II)0.3230.189−0.0250.1960.3150.4470.7021.003940
γ₄ (stage III)0.2570.179−0.0830.1360.2500.3770.6211.003920
γ₅ (stage IV)0.6000.1680.2770.4850.5930.7150.9301.0021,100
γ₆ (chemo)0.0560.177−0.282−0.0660.0550.1750.4151.0013,000
γ₇ (radiation)0.2710.167−0.0510.1530.2710.3860.6011.004530
γ₈ (surgery)0.2020.171−0.1220.0820.2020.3150.5431.005510
Deviance409.0914.743401.595405.691408.426411.703420.0961.0013,000

Posterior summary via Gibbs sampling.

Figure 7

4.2.4 Bayesian estimation using (NUTS) sampler using RStan

The NUTS results show high effective sample sizes and stable posterior summaries. Parameter estimates are virtually identical to the other MCMC approaches, reinforcing the robustness of the simulated regression structure (see Table 11, Figure 8).

Table 11

ParameterMeanSD2.5%50%97.5%n_effRhat
β₀ (Intercept)−1.4000.460−2.330−1.390−0.53018851.002
β₁ (Age)0.0200.0100.0100.0200.0302,4201.001
β₂ (Gender)0.2700.1100.0600.2700.4903,0371.002
β₃ (TumorSize)0.1200.0300.0600.1200.1803,3491.001
γ₂ (Smoking)0.3400.1000.1300.3400.5403,2401.001
γ₃ (Stage II)0.3300.190−0.0300.3200.71018051.003
γ₄ (Stage III)0.2600.180−0.0800.2500.62017861.001
γ₅ (Stage IV)0.6000.1700.2900.5900.94017021.002
γ₆ (Chemo)0.0500.180−0.2900.0500.4202,1911.001
γ₇ (Radiation)0.2700.170−0.0400.2700.61020991.001
γ₈ (Surgery)0.2000.170−0.1300.2000.5502,2421.001
lp__196.8502.420191.100197.260200.5101,5821.000

Posterior summary via NUTS.

Figure 8

4.2.5 Comparative assessment

All four methods converge to nearly identical posterior means, confirming posterior stability under the log-linear Poisson structure. Laplace approximation slightly underestimates uncertainty relative to simulation-based methods, as expected from its quadratic assumption. Independent Metropolis and Gibbs sampling yield comparable inference but require larger iteration counts to achieve similar precision. NUTS demonstrates the highest computational efficiency and most stable effective sample sizes.

The small maximum absolute differences between the Laplace estimates and the MCMC posterior means indicate that the fitted posterior surface is regular and approximately Gaussian in this simulated setting. The relative standard deviation errors are also small, suggesting that the different methods provide closely aligned uncertainty estimates, although Laplace approximation remains slightly more local in nature.

Among the simulation-based methods, NUTS provides the best balance of sampling efficiency and numerical stability, as reflected by its higher effective sample size per second and more efficient exploration of the posterior distribution. Independent Metropolis and Gibbs sampling produce broadly similar posterior summaries, but their lower effective sample size per second values indicate slower posterior exploration and greater computational burden.

To complement the graphical comparison, Table 12 reports quantitative agreement across methods using maximum absolute differences from the Laplace estimates, relative standard deviation error, wall-clock run time, and effective sample size per second for the MCMC methods. These summaries provide a concise measure of both estimation accuracy and computational efficiency.

Table 12

ParameterEstimateMax |diff| vs laplaceRelative SD errorESS/sTotal Runtime (approx.) (sec)
Laplace modeIM meanGibbs meanNUTS meanIMGibbsNUTSIMGibbsNUTS
Intercept−1.440−1.389−1.424−1.4000.0510.03511171374959.945.039
Age0.0220.0200.0200.0200.0020.0501130480959.945.039
Gender0.2440.2640.2760.2700.0320.06511221603959.945.039
Tumor Size0.1240.1190.1190.1200.0050.0351161665959.945.039
Smoking0.3010.3430.3400.3400.0420.0501164643959.945.039
Stage II0.2300.3130.3230.3300.1000.0601195358959.945.039
Stage III0.2350.2440.2570.2600.0250.0401193354959.945.039
Stage IV0.6220.5880.6000.6000.0340.03011111338959.945.039
Chemo−0.0570.0350.0560.0500.1130.04011302435959.945.039
Radiation0.1480.2600.2710.2700.1230.050953417959.945.039
Surgery0.1670.1830.2020.2000.0350.0601051445959.945.039

Quantitative comparison of Bayesian estimation methods for the simulated lungs data.

For this simulated dataset, methodological agreement is strong because the posterior surface is regular and approximately Gaussian. In more complex or sparse clinical count data, divergence between Laplace and MCMC methods may signal non-normal posterior geometry and motivate full simulation-based inference.

The table shows that the posterior means are highly consistent across all four methods, with only small method-specific differences. The MCMC samplers provide comparable point estimates, while their relative efficiency is better summarized by ESS/s and run time than by posterior means alone (see Figure 9).

Figure 9

5 Model adequacy: prior sensitivity analysis and posterior predictive assessment

Bayesian inference depends jointly on the likelihood specification and prior assumptions. Even when computational convergence is achieved, inference may be unreliable if the assumed log-linear Poisson structure fails to represent key data features. Model adequacy is therefore evaluated through prior sensitivity analysis and posterior predictive assessment, following standard Bayesian practice (, ).

5.1 Prior sensitivity analysis

Throughout Sections 4.1 and 4.2, regression coefficients were assigned independent weakly informative Normal priors to stabilize computation while allowing the likelihood to dominate inference (); (Gelman et al., 2013). Because the two applications differ in structure and complexity, different prior scales were considered for sensitivity analysis.

5.1.1 System component reliability data (SCRD)

For the system component reliability data, prior sensitivity was examined using three increasingly concentrated Normal priors,

Representing weakly to moderately informative specifications.

Posterior means and credible intervals under these alternative priors were nearly identical to those reported in Section 4.1. Year effects remained centered near zero, while seasonal month effects—particularly February, October, and December—consistently retained positive posterior mass away from zero. Posterior uncertainty exhibited only minor changes across prior scales, indicating that inference is driven primarily by the likelihood rather than prior specification (see Figures 10, 11).

Figure 10

Figure 11

5.1.2 Simulated lung cancer data

For the simulated lung cancer dataset, broader prior scales were adopted to reflect higher parameter uncertainty in a multivariable clinical setting. Prior sensitivity was assessed using.

Posterior summaries for tumor size, cancer stage indicators, and chemotherapy effects remained stable across prior specifications. Minor widening of credible intervals was observed for weaker predictors such as smoking status and radiation therapy; however, effect direction and substantive interpretation were unchanged. The intercept consistently reflected a low baseline metastasis intensity under reference conditions (see Figure 12).

Figure 12

5.2 Posterior predictive assessment

Posterior predictive checks were used to assess whether data generated from the fitted models resemble the observed counts (Gelman et al., 2013). Under the log-linear Poisson specification,

Replicated observations were drawn from the posterior predictive distribution.

5.2.1 System component reliability data (SCRD)

For the system component reliability data, replicated monthly counts closely matched the empirical distribution. Posterior predictive means aligned with observed averages, and dispersion characteristics were comparable. No systematic underprediction of high-count months or overprediction of low-count months was detected. Discrepancy measures based on total counts and maximum monthly removals yielded Bayesian p-values near 0.5, providing no evidence of lack of fit.

Figure 13 illustrates the posterior predictive density comparisons between observed and replicated monthly removal counts for the SCRD across the Bayesian estimation methods.

Figure 13

Simulated lung cancer data

For the simulated lung cancer data, posterior predictive distributions successfully reproduced the observed variability and right-skewed count structure induced by heterogeneous covariate effects. Because the data were generated under the assumed model, close predictive agreement is expected; nevertheless, these results confirm correct implementation of the Bayesian computational procedures.

Figure 14 presents the posterior predictive checks for the lung cancer model. The top panels compare observed and replicated count distributions, while the bottom panels compare posterior predictive mean and variance across Bayesian estimation methods.

Figure 14

Convergence diagnostics further support adequacy. Across all MCMC implementations, potential scale reduction factors satisfied (), effective sample sizes were sufficient, and no pathological sampling behavior was detected under NUTS sampler. The close agreement between Laplace approximation and simulation-based methods additionally indicates a regular and approximately unimodal posterior surface.

Overall, both prior sensitivity analysis and posterior predictive assessment support the adequacy of the log-linear Poisson framework for the applications considered.

6 Discussion and conclusion

This study examined Bayesian estimation of log-linear Poisson regression models with applications to reliability engineering and medical event-count data. The primary objective was to provide a structured comparison of analytic and simulation-based Bayesian approximation techniques under a unified likelihood and prior specification.

For both applications, the log-linear Poisson model.

Offered a coherent representation of count data, allowing covariate effects to act multiplicatively on the intensity scale. The use of weakly informative Normal priors ensured computational stability while permitting the likelihood to dominate posterior inference.

Across both data sets, strong agreement was observed among the Laplace approximation, Independent Metropolis sampling, Gibbs sampling, and Hamiltonian Monte Carlo. The small maximum absolute differences in posterior means and the limited relative error in posterior standard deviations indicate that all four methods target essentially the same posterior structure, with only minor numerical variation. When the posterior distribution is approximately Gaussian and unimodal, the Laplace approximation provides accurate posterior summaries with minimal computational cost (, , ). Simulation-based methods validate these results while offering full posterior uncertainty (, ). The efficiency metrics further clarify the practical differences among the methods. In particular, effective sample size per second and total wall-clock time show that Hamiltonian Monte Carlo via the No-U-Turn Sampler delivers the most efficient posterior exploration among the MCMC methods, combining high sampling efficiency with stable convergence behavior (); (Hoffman and Gelman, 2014). Gibbs sampling and Independent Metropolis produced comparable posterior estimates, but their lower effective sample sizes per unit time indicate slower exploration of the posterior surface and greater computational burden. By contrast, Laplace approximation was the fastest deterministic method and produced results close to the MCMC summaries, but its local quadratic approximation may slightly understate posterior uncertainty relative to full simulation-based inference.

Prior sensitivity analysis confirmed that posterior inference remained stable under reasonable variations in prior scale for both applications. Posterior predictive checks further indicated that the fitted models adequately reproduced key features of the observed count distributions in reliability and medical contexts, supporting the adequacy of the assumed log-linear Poisson structure.

A key limitation of the present framework is the Poisson assumption of equi-dispersion. In settings with overdispersion, zero inflation, or unobserved heterogeneity, extensions such as negative binomial or hierarchical Poisson models may be more appropriate (). Moreover, in sparse or highly correlated designs, analytic approximations may understate posterior uncertainty, reinforcing the importance of full simulation-based inference.

In conclusion, Bayesian log-linear Poisson regression offers a flexible and computationally efficient framework for modeling reliability and medical count data. The close agreement between analytic and MCMC-based approaches observed in this study supports the use of Laplace approximation for rapid inference in moderate settings, while Hamiltonian Monte Carlo provides a robust and scalable solution for more complex models. These findings establish a practical methodological foundation for future extensions to hierarchical reliability systems and multilevel clinical count data analyses.

Statements

Data availability statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

Author contributions

MA: Conceptualization, Data curation, Formal analysis, Methodology, Resources, Software, Validation, Visualization, Writing – original draft, Writing – review & editing.

Funding

The author(s) declared that financial support was not received for this work and/or its publication.

Acknowledgments

The author acknowledges computational tools and resources that facilitated the Bayesian modelling and simulation procedures, including R, JAGS and Stan.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that Generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Summary

Keywords

Bayesian inference, count data modeling, Laplace approximation, Markov chain Monte Carlo, Poisson regression, reliability analysis

Citation

Akhtar MT (2026) Bayesian estimation of log-linear Poisson models: analytic and MCMC approaches with applications to reliability and medical count data. Front. Appl. Math. Stat. 12:1821648. doi: 10.3389/fams.2026.1821648

Received

02 March 2026

Revised

29 April 2026

Accepted

25 May 2026

Published

09 July 2026

Volume

12 - 2026

Edited by

Ashis SenGupta, Augusta University, United States

Reviewed by

Zakariya Yahya Algamal, University of Mosul, Iraq

Marek Skarupski, Politechnika Wroclawska Wydzial Matematyki, Poland

Updates

Copyright

*Correspondence: Md Tanwir Akhtar,

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics