WorksMathematics
A Bayesian quantile mixed model for bounded discrete outcomes
Abstract
Quantile regression for longitudinal bounded integer outcomes must accommodate discreteness, finite support, and dependence within participants. We develop a Bayesian quantile mixed model using a discrete Kumaraswamy distribution parameterized through a smooth quantile anchor whose ceiling gives the corresponding integer quantile. Covariates and correlated Gaussian participant effects enter a logit predictor for the scaled anchor, while a separate regression models distributional shape. Posterior computation combines a conjugate Gaussian coefficient update, available for compatible fixed and random effect designs, with slice sampling and covariance interweaving. Simulations showed small biases in regression coefficients and generally near-nominal coverage of 95% credible intervals. An application to repeated cognitive scores illustrates covariate associations across separately fitted quantile levels. Posterior predictive checks captured broad distributional patterns.
Introduction
Bounded discrete outcomes occur when an assessment takes values on a finite integer scale or a count has a known maximum. Examples include cognitive test scores, symptom totals, and the number of successes among a fixed number of opportunities. Repeated measurements introduce dependence within participants, while skewness and concentrations near the boundaries can make changes in the outcome distribution difficult to summarize by changes in its mean alone. Quantile regression provides a way to describe covariate associations at different locations of that distribution [1].
For discrete outcomes, quantile regression requires care in defining the regression target. The usual quantile changes in steps, and a probability level need not be attained exactly by the cumulative distribution function (CDF). Existing longitudinal approaches include Bayesian regression for smoothed counts [2] and conditional mid-quantile regression [3]. A continuous extension can provide a smooth target while retaining a discrete observation model, as in model-aware quantile regression [4]. Related median regressions use a smooth pseudo-median for binomial-logit- outcomes [5] and a shifted median for contaminated discrete Weibull counts [6].
For continuous bounded responses, Mitnik and Baek [7] developed median-based Kumaraswamy parameterizations, and Bayes et al. [8] formulated Bayesian quantile mixed regression with predictors for both the quantile and shape parameters. For bounded integer outcomes, Barbiero and Hitaj [9] introduced the discrete Kumaraswamy distribution, with an explicit probability mass function (PMF) and quantile function, and regression models for its shape parameters. We build on these developments while distinguishing the smooth quantile anchor from the corresponding integer quantile.
The proposed model extends this discrete family to longitudinal quantile regression, combining a smooth quantile anchor, a shape regression, and correlated participant effects. We make the anchor-to-integer mapping explicit, distinguish conditional and marginal quantiles, and derive a Gaussian full conditional update for the fixed regression coefficients when the fixed and random effect designs satisfy a specified compatibility condition. The sampler combines this update with established slice sampling and interweaving methods [10, 11, 12]. Separate fits at several quantile levels describe covariate associations across the conditional distribution, subject to an assessment of crossing. Beta-binomial mixed models provide an established approach to modeling the conditional mean of longitudinal bounded integer outcomes [13]. Although quantiles can be derived from their fitted distributions, our formulation specifies the regression structure directly through a smooth quantile anchor.
§ 2 gives the distributional construction and quantile relationships, § 3 specifies the mixed model, and § 4 develops posterior computation. § 5 evaluates parameter recovery and interval coverage, and § 6 illustrates the method using repeated cognitive scores. § 7 discusses the findings, limitations, and possible extensions.
The discrete Kumaraswamy distribution
Construction and basic properties
Let have the continuous Kumaraswamy distribution with positive shape parameters and , and CDF
For a known positive integer , define . Then takes values in . This construction yields the distribution of Barbiero and Hitaj [9] shifted to start at zero, with categories. At integer arguments, the CDF and PMF are
and
The boundary conventions are for and for . At noninteger arguments in , the actual discrete distribution function is obtained by replacing in (1) by . The probabilities in (2) are positive and sum to one by telescoping.
The two boundary probabilities are
Thus, the model assigns positive mass to both endpoints without an additional mixture component. These masses are determined by the same two shape parameters as the interior probabilities; they are not free parameters.
The upper bound is determined by the outcome scale. We require , corresponding to at least three possible outcome values, because a binary distribution cannot identify two unrestricted shape parameters. For an outcome supported on consecutive integers from a known lower bound to a known upper bound , subtracting gives the support with .
All moments exist because the support is finite. Writing
the first two moments follow from the survival-sum identities
The variance is .
Although the mean can be evaluated as a finite sum, expressing a shape parameter in terms of the mean while holding the other fixed generally requires numerical inversion. The smooth quantile anchor introduced below instead permits an explicit reparameterization.
Smooth extension and integer quantiles
Define a smooth extension of the integer-point distribution function by
with for and for . This is the distribution function of and agrees with (1) at the integer support points. It differs from the step function between those points. The construction gives almost surely; no independently jittered response is introduced.
For , the inverse of (4) is
We call the smooth quantile anchor, or relaxed quantile. It is the -quantile of the specified smooth extension, rather than a noninteger value of the discrete quantile function.
Proposition 1 makes explicit the relationship between the smooth quantile anchor and the integer quantile and recovers the quantile formula of Barbiero and Hitaj [9] under our shifted support.
Proposition 1. For , and , the lower integer quantile satisfies
In particular, .
Proof. The function is strictly increasing on and . At an integer , is therefore equivalent to . Since , the smallest such integer is . The bound follows from the defining property of the ceiling function. □
In practical terms, the discrete quantile is the relaxed quantile rounded upward to the nearest integer: a relaxed quantile of 7.3 gives an integer quantile of 8, whereas a relaxed quantile of 7 gives 7. Thus, the discrete quantile lies less than one unit above the relaxed quantile. This relationship also gives an exact simulation rule: if , then has PMF (2).
Quantile parameterization
Fix a target level . Define the scaled version of the anchor in (5) by
For a positive shape parameter , set
Both shapes are positive throughout the rectangular parameter space . Equivalently, and . Since , substitution into (4) gives
Consequently, (6) preserves the chosen relaxed quantile exactly, and the corresponding integer quantile is .
For fixed , this is a reparameterization of the original two-shape family. Given , the inverse mapping is
Here, indexes the chosen regression target and is not an additional unknown distributional parameter. We write for the PMF in (2) after this substitution.
For the continuous variable , is its ordinary -quantile, and (6) is the parameterization of Bayes et al. [8], with their corresponding to . Here, this parameterization indexes the discrete probabilities in (2), with relaxed anchor and integer quantile .
For fixed and , the parameter changes the distributional shape while leaving fixed. It is not defined as a variance or an inverse variance. The moments in (3) generally depend on both and ; neither the anchor nor the scaled anchor is parameterized as the response mean. Moreover, the smooth anchor is specific to the extension in (4). Other interpolations of the same discrete probabilities need not give the same noninteger anchor, even though the integer quantiles are unchanged.
Figure 1 illustrates the role of at three target quantile levels. Within each panel, changing alters the probability masses while preserving the relaxed anchor at and the corresponding integer quantile at . The examples show that markedly different distributions can share the same target quantile. The anchor satisfies , whereas the integer quantile satisfies ; its cumulative probability need not equal .
Figure 1. Discrete Kumaraswamy probability masses on for at three target quantile levels. All distributions share the relaxed anchor and corresponding integer quantile , marked by the dashed and dotted vertical lines, respectively. Points represent probability masses; connecting lines are visual guides.
Mixed quantile regression
Model specification and interpretation
Let denote the outcome for participant at assessment , where is the number of participants, is the number of assessment records for participant , and each upper bound is known. A common score maximum is the special case . Let be the fixed effect design vector, the random effect design vector, and the shape design vector. These vectors may contain intercepts, time functions, participant characteristics and interactions as appropriate. We condition throughout on the covariates, bounds and assessment times.
We write for the -variate normal distribution with mean vector and covariance matrix , and for its density. The symbols and denote the zero vector of length and the identity matrix; the dimension of a zero vector is omitted when clear from context.
For a fixed , specify
Here, and are the observation-specific scaled anchor and shape parameter, and are their regression coefficient vectors, and is the quantile linear predictor. The participant effects have positive definite covariance matrix , and . Conditional on and the model parameters, the observations for participant are independent with
where collects the regression and covariance parameters. In (8), the two Kumaraswamy shapes are
The scalar in (9) is a distributional shape; the bold vector denotes participant effects. The conditional anchor and integer quantile are therefore
where . Every finite linear predictor gives , so (10) respects the known integer support. Values of the relaxed anchor below zero correspond to an integer quantile of zero.
The design determines the participant-specific variation. A random intercept uses ; an intercept and slope use , where is assessment time on a specified scale; and more general designs can include several slopes or prespecified time basis functions. Actual assessment times may differ across participants. Conditional independence in (8) attributes within-participant dependence to these shared effects; an additional serial dependence process is not implicit in the formulation. Estimability of a chosen random effect structure depends on the number and timing of repeated measurements.
The coefficients act on the logit of the scaled quantile anchor. For a scalar covariate that enters the fixed predictor linearly, a one-unit increase changes that predictor by its coefficient when the random effect contribution and the other design terms are held fixed. Equivalently, it multiplies
by the exponential of the coefficient. The ratio in (11) describes the anchor’s position within its feasible interval; it is not the odds of a binary response event. When a covariate also has a random slope or enters an interaction, its participant-specific effect includes those additional terms.
The transformation in (10) gives smooth effects on the anchor but stepwise effects on the integer quantile. Different covariate profiles can consequently have different anchors and the same integer quantile. Shape covariates alter the remaining features of the conditional distribution without changing the target anchor when is held fixed. With observation-specific upper bounds, describes relative position on the normalized scale; comparisons on the original outcome scale must also account for .
Prior specification and posterior distribution
We use proper Gaussian priors for the regression coefficients,
where and are fixed prior mean vectors, and and are fixed positive definite prior covariance matrices. Zero means and diagonal covariance matrices give independent centered priors. These hyperparameters are specified on the scales of the predictors used in the model.
For the random effects, separate the standard deviations (SDs) from the correlations:
where is the SD of the th participant effect and is their correlation matrix. We assign independent priors
Here, is the distribution of the absolute value of a variable, with fixed scale hyperparameter . The Lewandowski, Kurowicka, and Joe (LKJ) prior has fixed concentration hyperparameter and density proportional to over positive definite correlation matrices [14]. All prior blocks in (12) and (14) are mutually independent. Numerical hyperparameter choices for the application are given in § 6.
When , write for the correlation between the two participant effects. It has density proportional to on , or equivalently . When , the correlation matrix is fixed at one. A Cholesky factorization , with lower triangular and having positive diagonal entries, yields the equivalent representation
The vectors are independent standardized, or whitened, participant effects. The factorization in (15) ensures a valid covariance representation; the probability model for that covariance remains the prior in (14).
For the posterior formulation, let index participant ’s observed responses and let collect their observed values . For collections of participant vectors, we use , with analogous notation for other participant-level vectors. Write , with , and abbreviate the conditional mass function as
where the shapes on the right are evaluated using . For incomplete responses, we assume missing at random (MAR) given the recorded covariates and observed outcomes, with distinct parameters and independent priors for the outcome and missingness mechanisms [15].
Assuming independence across participants, the joint posterior based on the observed responses is
Here, is the joint parameter prior density defined by (12) and (14), and conditioning on denotes the posterior density. With the proper priors above, the posterior is proper for any finite collection of supported observations; the bounded discrete likelihood gives the short argument in Appendix § 9.§ 1.
Posterior inference for anchors, integer quantiles and other functionals is obtained by evaluating the corresponding expressions at every retained draw after warmup. Parameter summaries use posterior medians and 95% equal-tailed credible intervals.
Quantile inference and comparisons
The target in (10) is conditional on participant effects. At fixed model parameters, marginal quantiles are obtained by averaging the conditional CDF over the distribution of participant effects and then inverting the resulting CDF. Setting the effects to zero gives a conditional reference profile, while averaging conditional quantiles generally does not yield marginal quantiles.
Posterior credible intervals for quantiles describe uncertainty in those quantities. Posterior predictive intervals instead describe variation in replicated outcomes or summaries of those outcomes, incorporating both posterior uncertainty and outcome variability.
A fit anchored at specifies an entire conditional distribution and supplies other quantiles through (5). However, changing the target level generally does not preserve the assumed regression structure. We therefore fit the model separately at prespecified levels , using the full observed-data likelihood at each level, with separate , , and .
The models fitted separately at different quantile levels need not represent one common conditional distribution or yield noncrossing anchors. We assess crossing of posterior median anchors and integer quantile summaries at matched covariate profiles, allowing integer ties. Coefficient comparisons across levels are descriptive.
Posterior computation
We combine an exact Gaussian coefficient update with elliptical slice sampling [11], scalar slice sampling [10], and covariance interweaving [12]. The coefficient update exploits a relationship between the fixed and random effect designs. We derive it for general compatible designs, then describe the implemented random intercept and slope sampler. Throughout this section, is fixed, and its subscript is suppressed, including in density notation .
Total participant coefficients
Let and have rows and , respectively. Suppose that a known matrix satisfies
Using hierarchical centering [16], define the total participant coefficients
This is an invertible change of coordinates with unit Jacobian. Since , participant ’s observed log likelihood can be written as
Here, the shape functions are
These are the shapes in (9), expressed in total-coefficient coordinates with fixed. In these coordinates, the observation likelihood does not depend separately on .
Proposition 2 (Gaussian coefficient conditional). Under (17) and the Gaussian prior in (12), holding fixed gives
The precision is positive definite whenever and are positive definite. The derivation is given in Appendix § 9.§ 2. The update changes while preserving every conditional predictor. The Gaussian conditional follows from the hierarchical normal distribution of the total coefficients; it does not approximate the discrete observation likelihood. Numerically, the draw is obtained by a Cholesky factorization of and triangular solves, without forming its inverse.
Condition (17) holds for a fixed time slope and participant-level covariates when the random effects include an intercept and the same time slope. It need not hold for arbitrary designs in § 3.1. Outside this class, (19) is unavailable for the full coefficient vector, and a likelihood-dependent update, such as elliptical slice sampling under the Gaussian prior, is required. Positive definiteness of the posterior precision under a proper prior does not itself establish likelihood identifiability.
Participant and shape updates
At fixed , , and , the participant effects have conditionally independent densities
where is participant ’s observed log likelihood defined in (18). An independent auxiliary draw defines elliptical proposals indexed by an angle ,
For an independent , let
Draw an initial angle and initialize the angular bracket to . Starting with , accept the proposal when . Otherwise, replace the bracket endpoint having the same sign as by , draw a new angle uniformly from the reduced bracket, and repeat. The Gaussian prior is accounted for by the elliptical construction, so the slice comparison uses only the observed log likelihood [11]. After accepting the move, set .
Holding fixed, the shape coefficients have conditional density
We update this block jointly using the prior-centered ellipse
with a slice height based on . The implementation uses the centered prior case .
Covariance updates in two parameterizations
For the implemented case , use unconstrained coordinates
Here, is the inverse hyperbolic tangent. Write for the covariance in (13) recovered using and . The log prior density with respect to is, up to a constant,
The transformation Jacobian is , giving exponent , rather than , in the final term. The derivation and the explicit covariance Cholesky factor are given in Appendix § 10.
Holding and fixed, successive scalar slice updates of the three coordinates target the centered log conditional
Here, denotes the matrix trace. The observation likelihood is constant during this update because the linear predictors are fixed.
Next, write with , the lower triangular Cholesky factor of the full covariance, and set . Holding these whitened effects, , and fixed, a second sequence of scalar slice updates targets
For each participant, the transformation has Jacobian , which cancels the factor in the Gaussian density. The resulting standard normal density of is independent of . Consequently, no additional determinant term appears in (28), and the likelihood is recomputed as changes. Transforming back moves the covariance and participant effects together. These complementary representations implement the interweaving principle of Yu and Meng [12].
Each stochastic step in Algorithm 1 preserves its conditional target, and each coordinate change is invertible with the stated Jacobian. Their composition therefore leaves (16) invariant; Appendix § 11 gives the argument. This establishes the target of the sampling procedure, while convergence and Monte Carlo precision for a finite run require separate assessment.
Algorithm 1. One posterior sampling sweep
For a fixed quantile level , take the observed data, prior hyperparameters, and a valid current state for the random intercept and slope model, with .
For each participant, update by elliptical slice sampling using (21) and (22). Set .
Hold fixed and draw from (19). Recompute for every participant.
Hold and fixed and update each coordinate of by scalar slice sampling with the centered log target in (27).
Compute for every participant. Hold these whitened effects, , and fixed and update each coordinate of by scalar slice sampling with the log target in (28).
For every participant, set and .
Hold fixed and jointly update using (24) and a slice based on .
Repeat the sweep and retain every iteration after warmup.
Implementation and numerical assessment
The sampling sweeps are implemented in C++, with R coordinating independent chains, posterior summaries, and predictive checks. The model specification and settings supported by the supplied application code are described in § 6.
Probability calculations use logarithms of differences of survival probabilities, explicit endpoint cases, and stable evaluations of logarithms near zero. Limiting expressions are used where direct evaluation would lose floating-point precision. Scalar slice updates use randomized starting brackets, stepping out and shrinkage, with fixed initial widths. Numerical iteration limits raise an error if reached. Independent chains can run in parallel; checkpoints retain the sampler state and random-number generator state for restarting. All post-warmup draws contribute to posterior summaries and prediction.
Implementation checks compare the probability calculations with a separate R implementation, verify the covariance density transformations, and assess sampler moments in targets with analytically known moments. Sampling is assessed using trace plots, the rank-normalized convergence diagnostic , and bulk and tail effective sample sizes [17]. Parameter recovery and interval coverage are evaluated in § 5.
Posterior predictive checks compare replicated and observed score frequencies [18]. Conditional replicates retain the sampled effects of existing participants. Replicates for a new cohort instead draw one fresh effect vector per participant at each posterior draw and share it across that participant’s assessments. Both schemes retain the observed covariates, assessment times, and pattern of recorded outcomes. These checks do not test the MAR assumption or constitute out-of-sample validation.
Simulation study
Design and data generation
We evaluated parameter recovery and the repeated-sampling coverage of Bayesian credible intervals under the proposed model. Four scenarios crossed participants with target quantile levels . We generated 300 independent datasets per scenario. The generating model used the Benton Visual Retention Test (BVRT) specification in (29), with scores on , quantile regression terms for time, education, entry age, and sex, a correlated Gaussian random intercept and time slope, and an education effect in the shape regression. For each quantile level, generating values were the corresponding application posterior medians rounded to two decimal places and held fixed across datasets and sample sizes (Table 1). The two quantile settings therefore represent distinct application-based distributions, rather than two targets within a single generating distribution.
| Parameter | Description | True | Bias | RMSE | CP (%) | Bias | RMSE | CP (%) | |
| 0.50 | Quantile regression | Intercept | 0.60 | 0.014 | 0.135 | 94.0 | −0.001 | 0.091 | |
| Time (per 5 years) | −0.17 | −0.003 | 0.034 | 97.3 | −0.001 | 0.024 | |||
| Primary school graduation | 0.58 | −0.021 | 0.145 | 96.7 | −0.003 | 0.101 | |||
| Entry age (per 10 years) | −0.46 | −0.004 | 0.105 | 95.7 | 0.001 | 0.080 | |||
| Male sex | 0.14 | 0.010 | 0.132 | 95.3 | 0.009 | 0.087 | |||
| Shape regression | Intercept | 0.92 | −0.012 | 0.102 | 94.7 | −0.010 | 0.078 | ||
| Primary school graduation | −0.13 | 0.009 | 0.119 | 95.3 | 0.001 | 0.086 | |||
| Participant effects | Random intercept SD | 0.56 | −0.019 | 0.073 | 95.3 | −0.013 | 0.052 | ||
| Random slope SD | 0.14 | −0.021 | 0.056 | 96.7 | −0.014 | 0.045 | |||
| Intercept-slope correlation | −0.54 | 0.123 | 0.297 | 98.3 | 0.055 | 0.208 | |||
| 0.90 | Quantile regression | Intercept | 1.29 | 0.018 | 0.145 | 95.0 | 0.004 | 0.101 | |
| Time (per 5 years) | −0.16 | −0.003 | 0.034 | 96.3 | 0.000 | 0.025 | |||
| Primary school graduation | 0.63 | 0.001 | 0.160 | 93.7 | 0.001 | 0.116 | |||
| Entry age (per 10 years) | −0.42 | −0.001 | 0.100 | 96.0 | −0.002 | 0.071 | |||
| Male sex | 0.13 | −0.005 | 0.120 | 95.0 | 0.002 | 0.086 | |||
| Shape regression | Intercept | 0.35 | −0.028 | 0.179 | 93.3 | −0.007 | 0.133 | ||
| Primary school graduation | −0.23 | 0.020 | 0.198 | 95.7 | −0.001 | 0.152 | |||
| Participant effects | Random intercept SD | 0.52 | −0.019 | 0.068 | 96.0 | −0.013 | 0.052 | ||
| Random slope SD | 0.13 | −0.020 | 0.052 | 96.0 | −0.017 | 0.044 | |||
| Intercept-slope correlation | −0.55 | 0.128 | 0.300 | 97.3 | 0.077 | 0.226 |
Table 1. Bias, RMSE and coverage for the BVRT quantile mixed models. and . Notes: True values are application posterior medians rounded to two decimal places. Bias is the average posterior median minus truth. RMSE is the square root of the average squared difference between the posterior median and truth. CP is coverage (%) of 95% equal-tailed credible intervals. All 20,000 post-warmup draws per fit are used. Each scenario includes all 300 completed fits, including those with diagnostic flags. No fits were excluded. Parameters use the application scales.
Covariates and assessment schedules were sampled jointly from the 500 participants in the PAQUID subsample described in § 6. For each simulated dataset, we sampled participants uniformly with replacement, retaining each selected participant’s education, sex, entry age, and assessment times at which a BVRT score was observed. Elapsed time was expressed per five years, and entry age was centered at the mean of the original 500 participants and expressed per ten years. This centering constant was used for both generation and fitting and was not recomputed within simulated samples. Sampling whole participant records preserved the empirical relationships between covariates, follow-up times, and numbers of observed assessments, including participants with only one assessment.
For every selected participant, we independently generated a new Gaussian effect vector using the scenario-specific SDs and correlation. Scores were then generated independently conditional on this vector and the covariates, using the inverse CDF of the discrete Kumaraswamy model. Repeated selections of the same source participant received independent effects and scores. The resampling step retained assessment times with observed BVRT scores; new responses were generated from the specified model. Thus, the study conditioned on sampled observation patterns and did not generate a dropout or missingness mechanism.
Estimation and results
Each dataset was fitted at its generating quantile level using the same likelihood and prior specification as the application: independent zero-mean Gaussian priors with SD 10 for the quantile and shape coefficients, half-normal priors with scale 5 for both participant-effect SDs, and a uniform prior on their correlation. Two chains with different initial states each used 1,000 warmup iterations followed by 10,000 retained iterations. The first 100 warmup iterations used only the centered covariance update; covariance interweaving was enabled for the remaining warmup and all retained iterations. Initial states did not use the generating parameters or simulated participant effects. Posterior medians and 95% equal-tailed credible intervals used all 20,000 post-warmup draws.
Recovery was assessed for the five components of , the two components of , the two SDs and , and the correlation . Bias was the average posterior median minus the generating value. Root mean squared error (RMSE) was the square root of the average squared difference between the posterior median and the generating value. Coverage probability (CP) was the percentage of 95% credible intervals containing the generating value. All three measures were calculated separately for each parameter and scenario, with bias and RMSE expressed on the parameter’s original scale.
All 300 datasets were fitted in each scenario, giving 1,200 completed fits. All completed fits contributed to Table 1, with no exclusions.
Quantile and shape regression coefficients showed small biases and generally near-nominal coverage of 95% credible intervals. Random slope SDs tended to be underestimated, while negative correlations were estimated closer to zero. Correlation bias decreased with sample size, although coverage remained above the nominal level. RMSE decreased with sample size for every parameter at both quantile levels.
Application to longitudinal cognitive scores
Data and model specification
We illustrate the model using repeated BVRT scores from PAQUID, a prospective observational study of aging in southwestern France [19]. The analysis uses the 500-participant subsample distributed as paquid in the lcmm R package [20]. BVRT measures visual memory on an integer scale from 0 to 15, with higher scores indicating better performance. Of the 2,250 supplied assessment records, 1,950 had an observed BVRT score. All 500 participants contributed to the analysis, including 115 with a single observed score. The sample included 288 women and 355 primary school graduates; mean age at cohort entry was 74.2 years. Assessment times and the number of observations varied between participants. Inference used the observed responses under the ignorable MAR assumption stated in § 3.2, without imputing missing scores.
We fitted the model separately at , with . The design vectors in (7) were
where is years since cohort entry divided by five, indicates primary school graduation, is entry age centered at its participant-level sample mean and divided by ten, and indicates male sex. Thus, the quantile predictor included time, education, entry age, and sex, with a correlated random intercept and time slope. The corresponding SDs are for the random intercept and for the time slope, with correlation as defined in § 3.2. Education also entered the shape predictor. Separating entry age from elapsed time distinguishes age differences between participants from longitudinal change within participants.
To identify the coefficients by their covariates, we write
Here, is the quantile intercept, and , , , and are the coefficients for elapsed time, primary school graduation, entry age, and male sex, respectively. These coefficients act on the logit of the scaled quantile anchor. The coefficients and are the intercept and education effect in the regression for .
For the application, the regression prior hyperparameters in (12) were
These choices give all quantile and shape regression coefficients independent zero-mean Gaussian priors with SD 10. In (14), we set and , giving half-normal priors with scale 5 for the random intercept and slope SDs and a uniform prior on their correlation over . These choices specify diffuse proper priors on the regression coefficients and random-effect SDs, with the same hyperparameters at all five quantile levels. Their implications for the Kumaraswamy shape parameters depend on the nonlinear parameterization and the chosen quantile level .
The supplied code implements this application design, with two random effects, five quantile regression coefficients, two shape regression coefficients with a binary predictor, and a common upper bound of 15. The initial scalar slice widths for , , and are 0.35, 0.35, and 0.8, respectively.
Using the sampler in § 4, two chains each retained 20,000 iterations after 2,000 warmup iterations for each fit. Summaries used all 40,000 retained draws. Across all five fits, rank-normalized values were below 1.01 and bulk and tail effective sample sizes exceeded 900 for all monitored parameters, including the participant effects.
Results
Table S1 in Section S1 of the Supplementary Material reports posterior medians and 95% equal-tailed credible intervals for the model parameters at each fitted quantile level.
| Parameter | Description | |||||
| Quantile regression | ||||||
| Intercept | −0.157 [−0.303; −0.015] | 0.215 [0.088; 0.341] | 0.598 [0.484; 0.714] | 0.966 [0.853; 1.079] | 1.290 [1.166; 1.415] | |
| Time (per 5 years) | −0.189 [−0.229; −0.151] | −0.178 [−0.215; −0.143] | −0.168 [−0.203; −0.134] | −0.161 [−0.194; −0.129] | −0.156 [−0.188; −0.126] | |
| Primary school graduation | 0.596 [0.446; 0.750] | 0.578 [0.445; 0.711] | 0.581 [0.457; 0.703] | 0.600 [0.478; 0.723] | 0.632 [0.496; 0.767] | |
| Entry age (per 10 years) | −0.521 [−0.624; −0.417] | −0.486 [−0.584; −0.390] | −0.457 [−0.550; −0.365] | −0.437 [−0.525; −0.349] | −0.421 [−0.507; −0.337] | |
| Male sex | 0.156 [0.030; 0.282] | 0.146 [0.031; 0.262] | 0.140 [0.029; 0.248] | 0.133 [0.029; 0.239] | 0.131 [0.029; 0.232] | |
| Shape regression | ||||||
| Intercept | 1.469 [1.413; 1.524] | 1.214 [1.143; 1.281] | 0.923 [0.827; 1.010] | 0.626 [0.509; 0.738] | 0.350 [0.203; 0.490] | |
| Primary school graduation | −0.072 [−0.134; −0.009] | −0.098 [−0.176; −0.020] | −0.133 [−0.234; −0.027] | −0.178 [−0.311; −0.043] | −0.228 [−0.392; −0.061] | |
| Participant effects | ||||||
| Random intercept SD | 0.630 [0.558; 0.706] | 0.592 [0.524; 0.663] | 0.559 [0.495; 0.628] | 0.536 [0.473; 0.600] | 0.520 [0.459; 0.584] | |
| Random slope SD | 0.162 [0.108; 0.214] | 0.151 [0.096; 0.199] | 0.141 [0.089; 0.188] | 0.135 [0.084; 0.178] | 0.130 [0.079; 0.173] | |
| Intercept-slope correlation | −0.531 [−0.695; −0.287] | −0.536 [−0.695; −0.284] | −0.536 [−0.701; −0.290] | −0.543 [−0.704; −0.287] | −0.548 [−0.704; −0.295] |
Table S1. Posterior summaries for the BVRT quantile mixed models.
Figure 2 shows that elapsed time and older entry age were associated with lower conditional quantile anchors, whereas primary school graduation and male sex were associated with higher anchors. Pointwise 95% credible intervals excluded zero for all four coefficients at every fitted level. On the logit scale, the negative associations with time and entry age were more pronounced at lower quantile levels. The education coefficient was broadly stable, while the male-female contrast decreased slightly towards the upper quantiles. Comparisons across levels are descriptive because the models were fitted separately; these coefficients describe associations with the scaled anchor, not changes measured in BVRT score points.
Figure 2. Covariate associations with conditional BVRT quantile anchors. Points show posterior medians of the regression coefficients, and shaded regions connect their pointwise 95% equal-tailed credible intervals at the five fitted quantile levels. Coefficients act on the logit of the scaled anchor. Time is expressed per five years and entry age per ten years; the reference categories are no primary school graduation and female sex. The horizontal dashed lines indicate zero. Connecting lines and shading are visual guides, do not represent estimates at unfitted quantile levels, and do not form a simultaneous credible band.
Across all five fitted quantile levels, the model indicated variation between participants in both intercepts and time slopes, with negative correlations between these effects. Primary school graduation was also associated with a lower shape parameter, indicating differences in distributional shape beyond the association with the quantile anchor.
For each participant, the grid combined observed assessment times with 21 equally spaced times between their first and last observed assessments. Reference grids used 81 equally spaced times from cohort entry to the maximum observed follow-up, at mean entry age, for each education and sex combination, with participant effects set to zero. No crossing was found among the posterior median anchors or integer quantiles at the observed assessments or the evaluated participant and reference-profile time grids. Participant-specific comparisons used the random effects estimated separately at each fitted quantile level. These findings do not guarantee noncrossing at other points or for individual posterior draws.
Figure S1–Figure S15 in Section S2 of the Supplementary Material present posterior predictive score frequencies for all five fitted quantile levels, overall and by education and sex. Both prediction schemes retain the observed covariates and assessment pattern. For the model fitted at , conditional and new-cohort predictions reproduced the broad score distribution and gave similar predictive medians overall. Local discrepancies remained, particularly among primary school graduates: frequencies at scores 10 and 11 were underpredicted, whereas those at scores 12 and 13 were overpredicted. At all five fitted quantile levels, the predictive median ceiling frequency was below the observed proportion for both prediction schemes, overall and within each education and sex group. These checks indicate that the model captures the broad distributional pattern but does not fully reproduce the upper-score probabilities.
Figure S1. Posterior predictive BVRT score frequencies overall for the model fitted at . Black crosses show observed proportions, blue circles show conditional predictive medians using the sampled effects of existing participants, and orange triangles show predictive medians using newly generated participant effects. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool all recorded assessments. Both prediction schemes retain the observed covariates, assessment times, and pattern of recorded outcomes, with one shared effect vector per participant. All post-warmup draws are used.
(a) (a) Female
(b) (b) Male
Figure S15. Posterior predictive BVRT score frequencies by sex for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S13.
Discussion
The proposed model provides a Bayesian quantile regression framework for bounded integer longitudinal outcomes. Its smooth quantile anchor supports regression modeling while retaining an explicit relationship with the integer quantile. Shape regression and correlated participant effects accommodate distributional differences and dependence within participants. Posterior computation combines established sampling methods with an exact Gaussian coefficient update available under compatible fixed and random effect designs.
Simulations showed small regression coefficient biases and generally near-nominal interval coverage. Covariance parameters were more difficult to estimate, although increasing the sample size reduced RMSE for every parameter. These results concern correctly specified models calibrated to one application; robustness to misspecification and comparative computational efficiency remain to be evaluated. Because generating parameters differed between quantile settings, performance differences cannot be attributed to quantile level alone.
The BVRT application illustrated covariate associations across five conditional quantile levels. Posterior predictive checks captured broad distributional patterns but underpredicted ceiling frequencies. Interpretation remains associational and depends on the stated MAR assumption. Informative attendance and truncation by death require separate consideration. Because the models are fitted separately, their target quantiles are not constrained to arise from a single common conditional distribution. The absence of crossing among the evaluated summaries does not guarantee noncrossing elsewhere.
Future work could consider joint estimation across quantile levels and more flexible distributions near the boundaries. Mixtures of discrete Kumaraswamy components on the same support, whose smooth extensions share a common target anchor, would preserve that anchor and its integer quantile while allowing more flexible probability masses. Identifiability and computation for such extensions require further study.
Author contributions
The sole author was responsible for the conceptualization, methodology, software development, formal analysis, and preparation and revision of the manuscript.
Disclosure statement
The author declares no competing interests.
Data and code availability
The data analyzed in this study are publicly available as the paquid dataset distributed with the lcmm R package [20], available from https://CRAN.R-project.org/package=lcmm. This dataset is a subsample of the PAQUID cohort described by Letenneur et al. [19]; the full cohort is not distributed with the package.
The R and C++ code for the application analysis, simulation study, and manuscript outputs is publicly available at https://github.com/DABURGER1/Discrete_Bounded_QRMM.
Posterior propriety and Gaussian update
Posterior propriety
For fixed , let denote the joint prior probability measure for and , including the conditional Gaussian distribution of the participant effects. With supported observations and finite parameter values in the prior support, every observed mass is strictly positive and at most one. Hence
All prior distributions are proper, so the posterior normalizing constant satisfies
Thus (16) defines a proper posterior. Integrating out the participant effects gives the same constant for the marginal likelihood formulation. This argument establishes normalizability, not likelihood identifiability or insensitivity to the prior in a weakly informed model.
Derivation of Proposition 2
Suppress as in § 4. For fixed covariance parameters, the map from to has block triangular derivative matrix with identity diagonal blocks. Its determinant is one, even though each depends on . Consequently, the posterior in total-coefficient coordinates is proportional to
At fixed , the likelihood factors in (A.1) are constant in . The log conditional is therefore
where , and are given in (19), and const denotes terms independent of that may differ between lines. For any nonzero ,
This establishes both the Gaussian conditional and its nonsingular covariance. It does not require each to have full column rank.
For computation, let be its lower triangular Cholesky factorization. Solve by two triangular solves and generate
The covariance of the added term in (A.2) is .
For the application design in (29), the required matrix is
Thus contains the participant’s total intercept and time slope. Equation (A.3) verifies the compatibility condition directly, including the fixed effects of education, entry age and sex.
Covariance densities and Jacobians
Separation prior in unconstrained coordinates
Continue to suppress the fixed quantile index . For , independent half-normal priors and the prior give the density
for and , where denotes the beta function. This density is with respect to . The inverse of (25) has derivative matrix
Multiplying (B.1) by its determinant and taking logarithms gives (26). No additional transformation to matrix-entry coordinates is involved, because the prior was specified directly on SDs and correlation.
The covariance and its lower triangular Cholesky factor are
In particular, and . Writing for the entries of , the centered log target in (27) can equivalently be evaluated as
Here, the data likelihood contributes no term in because both and are fixed.
Whitened coordinates
For fixed , consider the joint transformation with . Although depends on , the full derivative matrix is block triangular. Its determinant is . For each participant,
Thus the posterior density in these coordinates is proportional to
At fixed , and , taking logarithms of (B.3) and retaining only the terms that depend on gives the log target in (28). The Jacobian for the covariance parameter transformation is already included in and remains necessary; it is distinct from the Jacobian for the participant effects canceled in (B.2).
Invariance of sampling sweep
Let denote the proper posterior probability measure in total-coefficient coordinates. The Gaussian draw in (19) is a full conditional update. The participant and shape steps use elliptical slice kernels for the conditional densities in (20) and (23); these kernels preserve a Gaussian prior multiplied by a likelihood [11]. The scalar stepping-out and shrinkage updates preserve the respective one-coordinate conditionals with log targets or [10]. The implemented widths are fixed; a numerical safeguard terminates with an error rather than silently truncating a transition.
To justify the coordinate changes, let be an invertible map and let be the distribution of the transformed state when the original sampler state . If a kernel preserves , transforming to the new coordinates, applying that kernel, and transforming back gives
for a measurable set of original states. Its invariance follows from
The total-coefficient and whitening transformations satisfy these conditions, with their densities derived in Appendix § 9 and Appendix § 10. Each full conditional or slice update, expressed back in the common coordinates, therefore preserves . If denote the constituent kernels of a full sweep in the order of Algorithm 1, then
This argument justifies the posterior target of the interwoven sweep. It is not a rate-of-convergence result and does not imply that a finite chain has reached equilibrium. In particular, no claim about improved mixing follows from invariance alone.
Posterior parameter summaries
Notes: Entries are posterior medians, with 95% equal-tailed credible intervals in brackets, using all 40,000 post-warmup draws per fit. Each column represents a separately fitted model. The coefficients act on the logit of the scaled quantile anchor; the coefficients act on log . Reference categories are no primary school graduation and female sex. Entry age is centered at the participant-level sample mean. Participant-effect SDs are on the logit predictor scale, with the slope expressed per five years.
Posterior predictive score frequencies
Figure S2. Posterior predictive BVRT score frequencies by education for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S1.
(a) Female
(b) Male
Figure S3. Posterior predictive BVRT score frequencies by sex for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S1.
Figure S5. Posterior predictive BVRT score frequencies by education for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S4.
Figure S4. Posterior predictive BVRT score frequencies overall for the model fitted at . Black crosses show observed proportions, blue circles show conditional predictive medians using the sampled effects of existing participants, and orange triangles show predictive medians using newly generated participant effects. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool all recorded assessments. Both prediction schemes retain the observed covariates, assessment times, and pattern of recorded outcomes, with one shared effect vector per participant. All post-warmup draws are used.
(a) (a) Female
(b) (b) Male
Figure S6. Posterior predictive BVRT score frequencies by sex for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S4.
Figure S8. Posterior predictive BVRT score frequencies by education for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S7.
Figure S7. Posterior predictive BVRT score frequencies overall for the model fitted at . Black crosses show observed proportions, blue circles show conditional predictive medians using the sampled effects of existing participants, and orange triangles show predictive medians using newly generated participant effects. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool all recorded assessments. Both prediction schemes retain the observed covariates, assessment times, and pattern of recorded outcomes, with one shared effect vector per participant. All post-warmup draws are used.
(a) (a) Female
(b) (b) Male
Figure S9. Posterior predictive BVRT score frequencies by sex for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S7.
(a) No primary school graduation
(b) Primary school graduates
Figure S11. Posterior predictive BVRT score frequencies by education for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S10.
Figure S10. Posterior predictive BVRT score frequencies overall for the model fitted at . Black crosses show observed proportions, blue circles show conditional predictive medians using the sampled effects of existing participants, and orange triangles show predictive medians using newly generated participant effects. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool all recorded assessments. Both prediction schemes retain the observed covariates, assessment times, and pattern of recorded outcomes, with one shared effect vector per participant. All post-warmup draws are used.
Figure S12. Posterior predictive BVRT score frequencies by sex for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S10.
(a) No primary school graduation
(b) Primary school graduates
Figure S14. Figure S14. Posterior predictive BVRT score frequencies by education for the model fitted at . Black crosses show observed proportions; blue circles and orange triangles show conditional and new-cohort predictive medians, respectively. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool recorded assessments within each group. Prediction schemes and use of all post-warmup draws follow Figure S13.
Figure S13. Posterior predictive BVRT score frequencies overall for the model fitted at . Black crosses show observed proportions, blue circles show conditional predictive medians using the sampled effects of existing participants, and orange triangles show predictive medians using newly generated participant effects. Vertical lines indicate pointwise 95% posterior predictive intervals. Proportions pool all recorded assessments. Both prediction schemes retain the observed covariates, assessment times, and pattern of recorded outcomes, with one shared effect vector per participant. All post-warmup draws are used.
References
- [1]Koenker R. Quantile regression: 40 years on. Annual Review of Economics. 2017;9:155–176. doi: 10.1146/annurev-economics-063016-103651.DOI
- [2]Jantre S. Bayesian quantile regression for longitudinal count data. Journal of Statistical Computation and Simulation. 2023;93(1):103–127. doi: 10.1080/00949655.2022.2096025.DOI
- [3]Russo A, Farcomeni A, Geraci M. Mid-quantile regression for discrete panel data. Journal of Statistical Computation and Simulation. 2024;94(12):2754–2771. doi: 10.1080/00949655.2024.2352527.DOI
- [4]Padellini T, Rue H. Model-aware quantile regression for discrete data [arXiv:1804.03714]; 2018. Revised 2019. doi: 10.48550/arXiv.1804.03714.DOI
- [5]Burger DA, van der Merwe S, Lesaffre E. Addressing outliers in mixed-effects logistic regression: a more robust modeling approach. Journal of Applied Statistics. 2026;53(5):832–854. doi: 10.1080/02664763.2025.2538076.DOI
- [6]Burger DA, van Niekerk J, Lesaffre E. Robust median regression for count data with general lower truncation using a contaminated discrete Weibull model. The International Journal of Biostatistics. 2026;doi: 10.1515/ijb-2025-0066.
- [7]Mitnik PA, Baek S. The Kumaraswamy distribution: median-dispersion re-parameterizations for regression modeling and simulation-based estimation. Statistical Papers. 2013;54(1):177–192. doi: 10.1007/s00362-011-0417-y.
- [8]Bayes CL, Bazán JL, de Castro M. A quantile parametric mixed regression model for bounded response variables. Statistics and Its Interface. 2017;10(3):483–493. doi: 10.4310/SII.2017.v10.n3.a11.DOI
- [9]Barbiero A, Hitaj A. A discrete Kumaraswamy distribution for modeling rating and ranking data. Environmental and Ecological Statistics. 2026;33(1):339–370. doi: 10.1007/s10651-025-00697-z.DOI
- [10]Neal RM. Slice sampling. The Annals of Statistics. 2003;31(3):705–767. doi: 10.1214/aos/1056562461.DOI
- [11]Murray I, Adams R, MacKay D. Elliptical slice sampling. In: Teh YW, Titterington M, editors. Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics; (Proceedings of Machine Learning Research; Vol. 9); Chia Laguna Resort, Sardinia, Italy. PMLR; 2010. p. 541–548. Available from: https://proceedings.mlr.press/v9/murray10a.html.arxiv.org/abs/1001.0175
- [12]Yu Y, Meng XL. To center or not to center: That is not the question - An ancillaryity-sufficiency interweaving strategy (ASIS) for boosting MCMC efficiency. Journal of Computational and Graphical Statistics. 2011;20(3):531–570. doi: 10.1198/jcgs.2011.203main.DOI
- [13]Najera-Zuloaga J, Lee DJ, Arostegui I. A beta-binomial mixed-effects model approach for analysing longitudinal discrete and bounded outcomes. Biometrical Journal. 2019;61(3):600–615. doi: 10.1002/bimj.201700251.
- [14]Lewandowski D, Kurowicka D, Joe H. Generating random correlation matrices based on vines and extended onion method. Journal of Multivariate Analysis. 2009;100(9):1989–2001. doi: 10.1016/j.jmva.2009.04.008.
- [15]Rubin DB. Inference and missing data. Biometrika. 1976;63(3):581–592. doi: 10.1093/biomet/63.3.581.DOI
- [16]Gelfand AE, Sahu SK, Carlin BP. Efficient parametrisations for normal linear mixed models. Biometrika. 1995;82(3):479–488. doi: 10.1093/biomet/82.3.479.DOI
- [17]Vehtari A, Gelman A, Simpson D, et al. Rank-normalization, folding, and localization: An improved R̂ for assessing convergence of MCMC (with Discussion). Bayesian Analysis. 2021;16(2):667–718. doi: 10.1214/20-BA1221.DOI
- [18]Gelman A, Meng XL, Stern H. Posterior predictive assessment of model fitness via realized discrepancies. Statistica Sinica. 1996;6(4):733–807. Available from: https://www3.stat.sinica.edu.tw/statistica/j6n4/j6n41/j6n41.htm.
- [19]Letenneur L, Commenges D, Dartigues JF, et al. Incidence of dementia and Alzheimer’s disease in elderly community residents of south-western France. International Journal of Epidemiology. 1994;23(6):1256–1261. doi: 10.1093/ije/23.6.1256.
- [20]Proust-Lima C, Philipps V, Liquet B. Estimation of extended mixed models using latent classes and latent processes: the R package lcmm. Journal of Statistical Software. 2017;78(2):1–56. doi: 10.18637/jss.v078.i02.






















