Tutorials › Multi-Omics Data Integration › Posterior Predictive Checks For Multi-Omics Factors

Latent Factor Models and Their Interpretation · Tutorial 253 of 597

Posterior Predictive Checks For Multi-Omics Factors

Learn to design and interpret posterior predictive checks that test whether a multi-omics factor model reproduces important features of the observed data.

Advanced 12 min read

What You'll Learn

  • Define posterior-predictive replicated data for matched omics samples.
  • Choose checks for cross-view correlation, marginal distributions, and extreme values.
  • Calculate and interpret posterior-predictive tail areas from simulated replicates.
  • Distinguish conditional checks from checks that regenerate latent factors.
  • Recognize simulation error, double use of data, and other limits of predictive checks.

Why Check Replicated Data?

A fitted multi-omics factor model can summarize shared structure while still failing to reproduce a feature of the data that matters scientifically. For example, it may capture average cross-view association but miss unusually strong correlations, skewed feature distributions, or extreme observations. A posterior predictive check asks a direct question: if this fitted model generated another data set, would that data set resemble the observed one in the feature we care about?

The check is only as useful as its target. A comparison of cross-view correlations probes dependence across matched samples; a comparison of feature-wise distributions probes marginal fit; and a comparison of blockwise extremes probes whether the model can generate unusually large values. These are different questions, so they require different summaries. A satisfactory result for one summary does not establish overall model adequacy.

Definition and Replication Scheme

Write \(Y^{(v)}\) for the observed data in omics view \(v\), with \(n\) matched samples and \(p_v\) features. Let \(\theta\) collect model parameters, such as loadings, noise parameters, and covariate effects, and let \(F\) denote latent factor scores. A fitted Bayesian model gives a posterior distribution for \((\theta,F)\) conditional on the observed data. A posterior predictive replicate is generated by drawing from that posterior and then simulating data from the model's observation distribution.

Definition: The posterior predictive distribution for replicated data \(Y^{\mathrm{rep}}\) is $$ p(Y^{\mathrm{rep}}\mid Y)=\int p(Y^{\mathrm{rep}}\mid \theta,F)\,p(\theta,F\mid Y)\,d\theta\,dF. $$ A posterior predictive check compares a chosen discrepancy or summary \(T(Y)\) with \(T(Y^{\mathrm{rep}})\) across draws from this distribution.

The model's likelihood and dependence assumptions must be stated before interpreting a check. For example, a continuous-data factor model might use

$$ Y_{ij}^{(v)}=\mu_j^{(v)}+\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}_j^{(v)} +\boldsymbol{\lambda}_j^{(v)\mathsf{T}}F_i+\varepsilon_{ij}^{(v)}. $$

Here \(\mathbf{x}_i\) contains covariates, \(F_i\) contains factors for sample \(i\), and \(\boldsymbol{\lambda}_j^{(v)}\) is the loading vector for feature \(j\) in view \(v\). The distribution of \(\varepsilon_{ij}^{(v)}\), and any dependence among residuals, is part of the model rather than an automatic property of factor analysis. For instance, conditional independence of feature residuals given \((\theta,F)\) is an assumption in some models, not a general rule. Count or binary data require observation distributions appropriate to those data, rather than a Gaussian likelihood by default.

For a check of the observed matched cohort, a common scheme draws \((\theta^{(b)},F^{(b)})\) from \(p(\theta,F\mid Y)\), then generates all views jointly using those draws and the model's observation distribution. Shared factors must be shared across views in each replicate if the fitted model represents shared structure. Holding posterior factor scores fixed while regenerating observations gives a conditional check of the observation model around those scores. To check a new cohort's overall distribution, latent factors should instead be generated from their population model. These schemes address different targets; silently mixing them can make a cross-view check misleading.

Choosing and Interpreting Discrepancies

A discrepancy \(T(Y)\) is a numerical feature of the data selected before examining the check's conclusion. It can be a correlation, a quantile, a dispersion measure, or a maximum. For a one-sided upper-tail check, the posterior predictive tail area is

$$ q_T=P\{T(Y^{\mathrm{rep}})\geq T(Y)\mid Y\}. $$

In computation, generate \(B\) replicates and estimate this quantity by

$$ \widehat{q}_T=\frac{1}{B}\sum_{b=1}^{B}I\{T(Y^{\mathrm{rep},b})\geq T(Y)\}. $$

For a two-sided discrepancy, define a distance from a prespecified reference \(c\), such as the predictive median, and compare \(|T(Y^{\mathrm{rep}})-c|\) with \(|T(Y)-c|\). The reference should be chosen for the scientific question; mechanically doubling a one-sided tail area is not always appropriate. A posterior predictive tail area is a model-checking summary, not a frequentist \(p\)-value and not the probability that the model is true. Since the observed data inform the posterior and also supply the observed discrepancy, these checks can be conservative: some lack of fit may be hard to detect.

Worked Checks

Worked Example: Cross-View Correlation

Hypothetical data. Suppose a continuous feature \(A\) in one view and a feature \(B\) in a second view are measured on the same \(n=12\) samples. Their observed Pearson correlation is computed from the centered values as

$$ r_{AB}=\frac{\sum_{i=1}^{12}(A_i-\bar A)(B_i-\bar B)} {\sqrt{\sum_{i=1}^{12}(A_i-\bar A)^2\sum_{i=1}^{12}(B_i-\bar B)^2}} =\frac{6.80}{\sqrt{10.0\times10.0}}=0.680. $$

Assume the fitted model represents both views jointly, uses their matched sample identities, and generates their replicated observations together. After \(B=100\) posterior predictive draws, 54 replicated correlations are at least \(0.680\). Thus

$$ \widehat{q}_T=\frac{54}{100}=0.540. $$

The observed correlation is not unusual in the upper tail of this model's predictive distribution. This does not show that the model reproduces every aspect of cross-view dependence: another feature pair, a correlation averaged across many pairs, or a correlation calculated within a subgroup could behave differently. Nor would the result be meaningful if the two views had been simulated independently despite the model specifying shared factors.

Worked Example: A Feature's Marginal Distribution

Hypothetical data. A standardized continuous feature has ten observed values, in increasing order: \(-2.1,-1.4,-0.8,-0.3,0.0,0.2,0.5,0.9,1.3,3.1\). Its sample median is the mean of the fifth and sixth values:

$$ T(Y)=\frac{0.0+0.2}{2}=0.10. $$

Suppose the posterior predictive median across replicated data sets is \(c=0\), and the 20 replicated medians are \(-0.30,-0.20,-0.10,0.00,0.05,0.08,0.12,0.20,0.30,0.40,-0.05,0.06,-0.08,0.15,-0.18,0.25,-0.02,0.11,-0.25,0.03\). For a two-sided median check, the observed distance is \(|0.10-0|=0.10\). Twelve replicated medians have distance at least \(0.10\), so

$$ \widehat{q}_T=\frac{12}{20}=0.600. $$

The observed median is not far from the predictive center by this comparison. However, the observed value \(3.1\) suggests a possible upper-tail feature that a median check cannot assess. A good marginal assessment therefore uses several prespecified summaries or a graphical comparison, such as predictive distributions of selected quantiles, rather than treating the median as a complete description of the distribution.

Worked Example: Extreme Values Across a Block

Hypothetical data. In the same standardized feature data above, the maximum absolute value is \(T(Y)=3.1\). Define \(T\) as the maximum absolute standardized value over a specified block of features, using the same standardization convention for observed and replicated data. Suppose 9 of 100 joint posterior predictive replicates have a block maximum at least \(3.1\). Then

$$ \widehat{q}_T=\frac{9}{100}=0.090. $$

The observed block contains a more extreme value than most, but not all, replicates. This is a signal to inspect the relevant feature, sample, likelihood, and preprocessing assumptions; it is not by itself proof of model failure. The block size matters: a maximum over many features is typically larger than a maximum over a few, so the replicate and observed statistics must use the same feature set and rule.

Why the Simulation Estimate Has Error

The posterior predictive distribution averages over uncertainty in parameters and latent factors. This follows directly from conditioning and integration: for any event \(A\) involving a replicate,

$$ P(Y^{\mathrm{rep}}\in A\mid Y) =\int P(Y^{\mathrm{rep}}\in A\mid\theta,F)\,p(\theta,F\mid Y)\,d\theta\,dF. $$

Drawing \((\theta,F)\) from the posterior and then drawing \(Y^{\mathrm{rep}}\) from the conditional observation model samples from this mixture. For the tail-area check, each indicator \(I\{T(Y^{\mathrm{rep}})\geq T(Y)\}\) is a Bernoulli variable with success probability \(q_T\). With independent predictive replicates, the Monte Carlo standard error of \(\widehat{q}_T\) is approximately

$$ SE(\widehat{q}_T)\approx\sqrt{\frac{\widehat{q}_T(1-\widehat{q}_T)}{B}}. $$

For the extreme-value example, this is \(\sqrt{0.09(0.91)/100}=0.0286\). Thus the estimate \(0.090\) has noticeable simulation uncertainty; more replicates can reduce that error. If posterior draws are dependent, as in Markov chain Monte Carlo, the effective number of independent draws can be smaller than \(B\), so simulation error should not be assessed as if every draw were independent.

Diagnostics, Alternatives, and Limitations

Use checks that target distinct ways the model could miss important structure. Cross-view correlations can be examined for selected feature pairs or summarized by a prespecified distribution of correlations. Marginal checks can compare distributions or quantiles feature by feature and by view. Extreme-value checks can use maxima within each view or a scientifically defined feature set. For every comparison, compute the observed and replicated statistic using the same rules, including sample inclusion, transformations, and handling of missing values.

Warning signs include observed summaries lying well outside the bulk of their predictive distributions, systematic discrepancies across many features, or observed tails consistently more extreme than simulated tails. Also inspect posterior predictive plots: a single tail area can conceal asymmetric or subgroup-specific mismatch. A check can fail because the likelihood, factor structure, residual dependence, covariate adjustment, or data-processing assumptions are inadequate. It does not identify which component is responsible without further targeted checks.

Posterior predictive checks complement the earlier material on residual diagnostics for factor models. Residual diagnostics focus on discrepancies after fitting; posterior predictive checks ask whether data generated under the fitted model reproduce selected data features, while propagating posterior uncertainty. Neither replaces the other. A held-out predictive assessment instead evaluates prediction on observations not used to fit the model, which addresses generalization more directly but requires a suitable holdout design and a clear predictive target.

Common pitfalls include treating a tail area as a calibrated test of the null hypothesis, checking only one convenient summary, and generating each omics view separately when the model specifies shared latent structure. Another is allowing an observed-data-dependent choice of statistic to go unreported; choosing the most discrepant feature after inspecting all features changes the interpretation of the check. Predefine summaries where possible, or reproduce the selection rule in every replicate. Finally, posterior predictive agreement is not proof of correctness: different models can reproduce the same summaries, and an unexamined feature may still be poorly fit.

Key takeaway: A posterior predictive check is a targeted comparison between an observed-data summary and the same summary computed on joint data simulated from the fitted posterior predictive distribution. Its conclusion is conditional on the chosen statistic, replication scheme, and model assumptions.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. A model specifies shared factors across two views. Why should replicated observations in those views be generated jointly for a cross-view correlation check?
  2. In 200 replicates, 32 values of a prespecified upper-tail statistic equal or exceed the observed statistic. Calculate the estimated posterior predictive tail area.
  3. An observed median is near the center of its predictive distribution, but the observed maximum is larger than nearly all replicated maxima. What does this suggest, and what does it not establish?
  4. Why can a maximum over 1,000 features not be compared directly with a maximum over 20 features?

Solutions. (1) Joint generation preserves the dependence induced by the shared factors; independent generation would remove that model-implied cross-view dependence. (2) \(\widehat{q}_T=32/200=0.160\). (3) The model may reproduce the center but underrepresent the tail or extremes; the discrepancy does not by itself identify the faulty assumption or prove the model false. (4) The larger feature set offers more opportunities for an extreme value, so observed and replicated maxima must use the same features and calculation rule.

Clinical Biostats