Tutorials › Pattern-Mixture and Selection Models › Bayesian Estimation and Prior Choices

Shared-Parameter Models · Tutorial 452 of 499

Bayesian Estimation and Prior Choices

Set up Bayesian inference for shared-parameter outcome-dropout models and learn how prior choices shape covariance, association, and posterior uncertainty.

Advanced 12 min read

What You'll Learn

  • Write the joint posterior for observed outcomes, dropout information, and shared random effects.
  • Distinguish conditional likelihood contributions from the likelihood integrated over latent effects.
  • Choose covariance and association priors whose scales have interpretable implications.
  • Calculate posterior summaries in a simple association-parameter example.
  • Recognize prior-dominance and weak-identification concerns when interpreting results.
  • Compare Bayesian inference with likelihood-based estimation without treating either as automatically definitive.

Why Prior Choice Matters in Shared-Parameter Models

A shared-parameter model connects an outcome process and a dropout process through latent subject-specific effects. The same latent effect can describe, for example, a tendency toward higher outcome values and a tendency toward earlier dropout. Because dropout can be related to unobserved outcomes through that effect, the association is not generally determined by the observed data alone. Bayesian inference makes this uncertainty explicit through a posterior distribution, but that distribution depends on both the likelihood and the prior.

The earlier material on joint likelihoods and EM estimation establishes the likelihood-based framework. Here the focus is the Bayesian extension: specifying priors for the fixed effects, random-effect covariance, and outcome-dropout association; combining them with the joint likelihood; and interpreting the resulting posterior uncertainty. A prior is not a device for making a difficult model automatically identifiable. Its scale and structure must be defensible and its influence examined.

Model and Posterior Distribution

Let \(Y_i\) denote the outcomes observed for subject \(i\), and let \(T_i\) denote the observed dropout information, such as a dropout time or a sequence of discrete-time dropout indicators. Let \(b_i\) be a \(q\)-dimensional latent random-effect vector shared by the two processes. Write \(\theta\) for outcome-model parameters, \(\gamma\) for dropout-model parameters, and \(\alpha\) for an association parameter. A common specification assumes

$$ b_i\mid D\sim N_q(0,D), \qquad Y_i\perp T_i\mid b_i,\theta,\gamma,\alpha . $$

The conditional-independence statement means that, once the shared effects and model parameters are given, the outcome and dropout contributions factor. It does not assert that outcomes and dropout are independent marginally. Let \(f_Y(Y_i\mid b_i,\theta)\) and \(f_T(T_i\mid b_i,\gamma,\alpha)\) denote the appropriate conditional contributions, including the observation and dropout pattern. The joint likelihood with latent effects included is

$$ L(\theta,\gamma,\alpha,D,\mathbf b) = \prod_{i=1}^n f_Y(Y_i\mid b_i,\theta)\, f_T(T_i\mid b_i,\gamma,\alpha)\, \phi_q(b_i;0,D), $$

where \(\phi_q(\cdot;0,D)\) is the multivariate normal density and \(\mathbf b=(b_1,\ldots,b_n)\). If the random effects are integrated out, subject \(i\)'s observed-data contribution is instead

$$ L_i(\theta,\gamma,\alpha,D) = \int f_Y(Y_i\mid b_i,\theta) f_T(T_i\mid b_i,\gamma,\alpha) \phi_q(b_i;0,D)\,db_i . $$

These are two representations of the same model, not two different assumptions. Bayesian computation may retain the \(b_i\)'s as latent variables or work with an integrated likelihood. In either case, priors are needed for all unknown parameters. Denote their joint density by \(\pi(\theta,\gamma,\alpha,D)\). Bayes' rule gives a posterior density proportional to likelihood times prior:

$$ \pi(\theta,\gamma,\alpha,D,\mathbf b\mid \mathbf Y,\mathbf T) \propto L(\theta,\gamma,\alpha,D,\mathbf b)\, \pi(\theta,\gamma,\alpha,D). $$
Definition: The posterior distribution is the conditional distribution of model parameters and latent effects given the observed outcomes and dropout information. A posterior credible interval is an interval containing a stated posterior probability, conditional on the specified model and priors.

Choosing Priors for Covariance and Association

A covariance matrix \(D\) must be positive definite. For multiple random effects, a useful parameterization separates standard deviations and correlations:

$$ D=S\Omega S,\qquad S=\operatorname{diag}(\tau_1,\ldots,\tau_q), $$

where \(\tau_k>0\) is the standard deviation of random effect \(k\), and \(\Omega\) is a correlation matrix. One practical prior family assigns weakly or moderately informative positive priors to the \(\tau_k\)'s and an LKJ prior to \(\Omega\). For example, \(\tau_k\sim\text{half-Normal}(0,A_k^2)\) and \(\Omega\sim\text{LKJ}(\eta)\). The half-Normal is the distribution of the absolute value of a centered normal variable; \(A_k\) sets its scale. The LKJ density is proportional to \(|\Omega|^{\eta-1}\). In two dimensions, \(\eta=1\) is uniform over the allowable correlation, while \(\eta>1\) gives increasing concentration toward zero correlation. Neither choice should be described as neutral without considering the dimension and parameterization.

An inverse-Wishart prior is another option for \(D\), but it couples marginal variances and correlations. That coupling can be undesirable when prior knowledge about standard deviations and correlations differs. A separation prior makes those components easier to inspect and communicate. Priors for outcome residual scales are also commonly positive, such as half-Normal or half-\(t\) priors; fixed effects can receive Normal priors on scientifically meaningful scales.

The association parameter needs particular care. In a discrete-time hazard model, for example,

$$ \operatorname{logit}\{h_{ij}(b_i)\} = \gamma_0+\gamma_1 t_{ij}+\alpha b_{i1}, $$

a one-unit increase in \(b_{i1}\), holding the other terms fixed, multiplies the dropout odds in interval \(j\) by \(\exp(\alpha)\). Thus the meaning of a prior on \(\alpha\) depends on the scale of \(b_{i1}\). If that random effect is rescaled, the numerical value and interpretation of \(\alpha\) change. Specify the random-effect scale first, then choose a prior on \(\alpha\) by examining the implied odds multipliers or hazard changes over plausible values.

Key principle: Set priors on scales with interpretable implications. For covariance parameters, inspect plausible random-effect standard deviations and correlations; for \(\alpha\), inspect the implied change in dropout risk over plausible random-effect values.

Worked Example: A Conditional Joint Contribution

Consider a hypothetical subject with one observed continuous outcome \(y=2.1\), followed by dropout in that interval. Suppose the outcome model is \(Y\mid b\sim N(0.5+b,0.8^2)\), and the dropout hazard is \(\operatorname{logit}(h)=-2+1.5b\). Evaluate the conditional joint contribution at \(b=0.4\), then include the random-effect density for \(b\sim N(0,0.5^2)\).

The outcome density is

$$ f_Y(2.1\mid b=0.4) = \frac{1}{0.8\sqrt{2\pi}} \exp\left\{-\frac{(2.1-(0.5+0.4))^2}{2(0.8)^2}\right\} \approx 0.1619. $$

The logit for dropout is \(-2+1.5(0.4)=-1.4\), so \(h=1/(1+\exp(1.4))\approx0.1978\). Because dropout occurred, the dropout contribution is \(h\), not \(1-h\). The conditional outcome-times-dropout contribution is \(0.1619(0.1978)\approx0.0320\). The random-effect density at \(b=0.4\) is

$$ \phi(0.4;0,0.5^2) = \frac{1}{0.5\sqrt{2\pi}} \exp\left\{-\frac{0.4^2}{2(0.5)^2}\right\} \approx0.5794. $$

Thus the joint density contribution at this fixed value of \(b\), including its random-effect density, is approximately \(0.0320(0.5794)=0.0185\). This is not the subject's marginal likelihood: that requires integrating the outcome, dropout, and random-effect density product over all possible \(b\).

Worked Example: Calibrating an Association Prior

Suppose \(b_{i1}\) is scaled so that one unit represents one standard deviation of the latent effect, and choose \(\alpha\sim N(0,0.5^2)\). What does this prior imply for the dropout odds multiplier per one-unit increase in \(b_{i1}\)?

The multiplier is \(\exp(\alpha)\). A central 95% interval for the prior on \(\alpha\) is approximately \(0\pm1.96(0.5)\), or \([-0.98,0.98]\). Exponentiating the endpoints gives \([\exp(-0.98),\exp(0.98)]\approx[0.375,2.66]\). Thus this prior places about 95% of its mass on odds multipliers between roughly 0.38 and 2.66 per one-standard-deviation increase in the shared effect. That may be reasonable in one application and too permissive in another; the calculation makes the choice assessable rather than labeling it simply “weak.”

Posterior Uncertainty and a Short Derivation

Posterior summaries should reflect uncertainty in the association and covariance parameters, not just uncertainty in the outcome regression. A posterior mean or median summarizes the center of a marginal posterior; a credible interval summarizes posterior mass under the full model and chosen priors. The interval is conditional on the model specification and prior choices, so it is not a guarantee that the model is correct.

The basic posterior calculation follows directly from Bayes' rule. For a scalar parameter \(\alpha\), suppose the likelihood is \(L(\alpha)\) and its prior density is \(\pi(\alpha)\). The joint density of data and parameter is \(L(\alpha)\pi(\alpha)\). Integrating over \(\alpha\) gives the marginal data density \(m=\int L(a)\pi(a)\,da\); dividing by \(m\) normalizes the joint density and yields

$$ \pi(\alpha\mid \text{data}) = \frac{L(\alpha)\pi(\alpha)} {\int L(a)\pi(a)\,da}. $$

This derivation also explains why a prior can matter most when the likelihood is relatively flat: the likelihood then changes little across values where the prior may vary substantially. In shared-parameter models, sparse dropout events, limited variation in dropout times, or weak separation of association from random-effect variance can leave the likelihood uninformative about \(\alpha\). Posterior concentration in such a setting may partly reflect prior information rather than strong empirical identification.

Worked Example: Updating an Association Parameter

For illustration, suppose a model produces an approximately Normal likelihood summary \(\hat{\alpha}=0.80\) with standard error \(0.40\), so that \(\hat{\alpha}\mid\alpha\) is approximated by \(N(\alpha,0.40^2)\). Combine this summary with the prior \(\alpha\sim N(0,0.50^2)\). This conjugate calculation illustrates prior updating; it is not an exact substitute for fitting the full shared-parameter model.

The prior precision is \(1/0.50^2=4\), and the likelihood precision is \(1/0.40^2=6.25\). The posterior variance is the reciprocal of their sum, and the posterior mean is the precision-weighted average:

$$ V_{\text{post}}=\frac{1}{4+6.25}=0.09756,\qquad \mu_{\text{post}}=V_{\text{post}}\left(4(0)+6.25(0.80)\right)=0.4878. $$

The posterior standard deviation is \(\sqrt{0.09756}=0.3123\). A Normal 95% credible interval is \(0.4878\pm1.96(0.3123)\), approximately \([-0.124,1.100]\). Under the illustrative likelihood and prior, the posterior probability that \(\alpha\) lies in this interval is 0.95. If \(\alpha\) is a log-odds coefficient, exponentiating gives an odds-multiplier interval of about \([0.883,3.00]\) per one-unit increase in the shared effect. The interval includes no association (\(\alpha=0\), multiplier 1), and the posterior center is pulled toward the prior mean relative to the likelihood estimate.

Assumptions, Checks, and Limits

The posterior is meaningful only relative to a coherent sampling model and prior specification. Before interpreting it, verify that the outcome and dropout contributions match the observed data structure, including which outcomes are available before dropout and how dropout indicators or times are encoded. Confirm that the conditional-independence assumption is the one intended: dependence between outcome and dropout is represented through the shared effects, not silently omitted. Check that covariance priors have support only on valid positive-definite matrices and that all chosen priors produce a proper posterior for the intended analysis.

Prior predictive checks are useful before fitting. Draw parameters and latent effects from the priors, generate hypothetical outcomes and dropout patterns, and ask whether the resulting ranges, dropout frequencies, and outcome-dropout associations are plausible. After fitting, compare posterior summaries under defensible alternative scales for \(\alpha\), random-effect standard deviations, and correlations. Large changes indicate that the data do not tightly determine those features. Posterior computation also requires numerical checks, but convergence and boundary diagnostics are a separate step; a plausible-looking posterior summary should not be taken as evidence that a simulation algorithm has sampled it reliably.

Bayesian estimation does not remove limitations of the model. If different combinations of \(\alpha\), \(D\), and dropout parameters imply similar observed-data distributions, posterior dependence can be strong and posterior inference can be sensitive to priors. Nor does a narrow posterior interval establish that the shared-effect distribution or link function is correct. Model checking and sensitivity to latent-effect distributions remain important.

Compared with maximum likelihood estimation using adaptive quadrature or EM estimation, Bayesian estimation combines the likelihood with explicit prior distributions and yields posterior distributions for parameters and latent effects. Likelihood-based methods do not require priors, though they still rely on the same substantive model and may have weakly identified parameters. Bayesian estimates can stabilize weakly informed components when prior information is defensible; they can also conceal that weakness if prior implications are not reported. Neither approach turns an untestable dropout assumption into a fact.

Common Pitfall

Common mistake: “The posterior interval for \(\alpha\) is narrow, so the data must have identified the outcome-dropout association.”

Correction: Posterior concentration reflects both likelihood and prior. Inspect the prior and posterior on the same scale, compare reasonable prior alternatives, and examine whether the observed dropout information can distinguish association values. A narrow interval under a restrictive prior may represent strong prior information rather than strong information in the observed data.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. Why does conditional independence of outcomes and dropout given \(b_i\) not imply marginal independence?
  2. If a prior for \(\alpha\) is \(N(0,0.3^2)\), what approximate central 95% interval does it place on \(\alpha\), and why should you transform it before interpreting an odds-ratio association?
  3. What is the distinction between a conditional contribution evaluated at \(b_i\) and the observed-data likelihood contribution?
  4. Why can a posterior estimate of association be sensitive to a prior even when the model has many subjects?

Solutions. (1) Both processes depend on \(b_i\); integrating over variation in \(b_i\) can induce marginal dependence. (2) The interval is approximately \(0\pm1.96(0.3)=[-0.588,0.588]\). For a log-odds association, exponentiating gives odds multipliers of about \([0.555,1.80]\) per unit of the shared effect. (3) The conditional contribution is the outcome and dropout density at a fixed latent effect; the observed-data contribution integrates that product against the random-effect distribution over all possible effects. (4) The number of subjects alone does not guarantee information about association: if dropout events or patterns provide little distinction among association values, the likelihood can remain relatively flat, allowing the prior to influence the posterior appreciably.

Clinical Biostats