Why Calibrate Signal and Noise?
A simulation can have the right qualitative structure and still be uninformative if its signals are nearly undetectable or unrealistically dominant. A coefficient of \(0.5\), for example, does not have a fixed meaning: it may be large for a feature with residual standard deviation \(0.1\) and small for one with residual standard deviation \(10\). Calibration makes the intended strength explicit relative to the noise, so scenarios can represent weak, moderate, or strong recoverable structure without relying on raw coefficients alone.
This tutorial focuses on defining and setting that relative strength. It does not make a particular strength realistic by itself: calibration is a design choice, and its interpretation depends on the simulated data scale, dependence structure, and analysis target.
Define the Scale Before Choosing a Strength
For a linear outcome-generating model, write \(Y=X\beta+\varepsilon\), where \(X\beta\) is the signal, \(\beta\) is the coefficient vector, and \(\varepsilon\) is the residual. If the predictors are centered, have covariance matrix \(\Sigma_X\), and the residual is uncorrelated with the predictors, then
The covariance matrix matters. The shortcut \(\operatorname{Var}(X\beta)=\sum_j\beta_j^2\) holds only when the predictors are uncorrelated and each has variance one. With correlated predictors, cross-products contribute to the signal variance; positive or negative covariance can change the total even when every coefficient stays fixed.
For a multivariate omics matrix, a useful calibration summary is the average feature-wise variance ratio. Let \(S_{ij}\) denote the simulated signal for sample \(i\) and feature \(j\), and \(E_{ij}\) its residual noise. One can calculate a signal variance and noise variance for each feature, then average each across the \(p\) features:
This summary gives each feature equal weight. It can conceal a mixture of very strong and very weak features, so report the distribution of feature-level ratios as well when that heterogeneity is important. For a feature with signal and noise components that are uncorrelated, its variance-explained fraction is its SNR divided by one plus its SNR. The multivariate average ratio is a summary; it is not automatically the variance explained for every feature or for every downstream estimand.
Worked Example: Setting Outcome Strength by Target \(R^2\)
Suppose a hypothetical simulation uses one centered predictor \(X\) with variance one and generates \(Y=0.30X+\varepsilon\). The residual has variance \(2.25\), is independent of \(X\), and has mean zero. Calculate the initial SNR and \(R^2\), then find the coefficient that gives target \(R^2=0.20\) while leaving the residual variance unchanged.
The signal is \(S=0.30X\), so its variance is \(0.30^2(1)=0.09\). Therefore \(\mathrm{SNR}=0.09/2.25=0.0400\), and \(R^2=0.09/(0.09+2.25)=0.03846\). The initial signal explains about \(3.85\%\) of response variance under this model.
For a target \(R^2\), the required signal variance is found by solving \(R^2=V_S/(V_S+\sigma^2)\):
With \(\operatorname{Var}(X)=1\), the new coefficient \(b\) must satisfy \(b^2=0.5625\), so \(b=0.750\) for a positive effect. The calibrated model is \(Y=0.750X+\varepsilon\). Its SNR is \(0.5625/2.25=0.250\), and its \(R^2\) is \(0.5625/(0.5625+2.25)=0.200\). Independence and the stated predictor variance justify these variance calculations.
Rescale the Signal, Not Just the Coefficients
A general calibration can start with an unscaled signal \(G\) and an error term \(\varepsilon\). Suppose both are centered, have finite variances, and are uncorrelated, with \(V_G=\operatorname{Var}(G)>0\) and \(V_E=\operatorname{Var}(\varepsilon)>0\). Set \(S=cG\). To achieve target SNR \(r\), choose \(c\) so that \(c^2V_G/V_E=r\). For a nonnegative signal multiplier, this gives:
If the target is specified as a variance-explained fraction \(q\), first convert it to SNR, \(r=q/(1-q)\), where \(0\leq q<1\). The assumptions are consequential: if \(G\) and \(\varepsilon\) are correlated, then \(\operatorname{Var}(cG+\varepsilon)=c^2V_G+V_E+2c\operatorname{Cov}(G,\varepsilon)\), and this simple square-root formula does not generally deliver the target. In that case, solve the variance equation including the covariance term or redesign the generator so signal and residual are uncorrelated.
Worked Example: Matching Strength Across Two Modalities
Consider two hypothetical omics modalities. For modality A, the average feature signal variance is \(0.16\), and the average residual variance is \(0.64\). For modality B, those values are \(4.00\) and \(16.0\). Their raw variances differ, but both have initial average SNR \(0.16/0.64=0.250\) and \(4.00/16.0=0.250\). Suppose the desired SNR for both is \(0.500\), with noise left unchanged.
For modality A, multiply the signal by \(c_A=\sqrt{0.500(0.64)/0.16}=\sqrt{2}=1.414\). The new signal variance is \(1.414^2(0.16)=0.320\), so the calibrated SNR is \(0.320/0.64=0.500\).
For modality B, \(c_B=\sqrt{0.500(16.0)/4.00}=\sqrt{2}=1.414\). The new signal variance is \(2(4.00)=8.00\), and the calibrated SNR is \(8.00/16.0=0.500\). In each modality, the corresponding variance-explained fraction is \(0.500/(1+0.500)=0.333\). Thus the two modalities match in relative signal strength despite their different measurement scales.
This calculation assumes that the stated variances were calculated on the same scale on which signal and noise are added. If one modality is transformed before analysis, its calibration should use variances after that transformation.
Account for Dependence Among Signal Components
When the signal is a sum of shared and modality-specific components, its total variance includes covariance terms. For two components \(S_1\) and \(S_2\),
Consequently, calibrating each component in isolation and adding their variances can give the wrong total SNR. A shared latent factor may induce positive covariance; opposing effects can induce negative covariance. Compute the variance of the combined signal in the generated structure, or use the covariance formula, before setting the noise level or signal multiplier.
Worked Example: Calibrating Correlated Signal Components
Suppose a hypothetical feature has signal \(S=0.40U+0.20V\), where \(U\) and \(V\) are centered, each with variance one, and have correlation \(0.50\). The residual is centered, independent of both factors, and has variance \(0.72\). Calculate the current SNR and the common multiplier for both signal coefficients needed to reach SNR \(0.500\).
Since \(\operatorname{Cov}(U,V)=0.50\), the signal variance is \(0.40^2+0.20^2+2(0.40)(0.20)(0.50)=0.16+0.04+0.08=0.280\). The current SNR is \(0.280/0.72=0.3889\).
Multiplying the entire signal by \(c\) multiplies its variance by \(c^2\), including the covariance contribution. The target signal variance is \(0.500(0.72)=0.360\), so \(c=\sqrt{0.360/0.280}=1.134\). The new coefficients are \(0.40(1.134)=0.4536\) and \(0.20(1.134)=0.2268\). The new signal variance is \(1.134^2(0.280)\approx0.360\), giving SNR \(0.360/0.72=0.500\). The residual variance is unchanged, and its independence from the factors supports the stated signal-noise variance decomposition.
Diagnostics, Alternatives, and Limitations
Calibration is a property of the generated data, not just of the parameter values in the code. After simulation, estimate signal and residual variances from their known generating components and compare the empirical ratios with their targets. Check across features and across replicates: a correct average can coexist with an unintended spread or with occasional features whose signal dominates. Also check that transformations, centering, missingness, or batch effects have not changed the scale on which the ratio was defined.
A useful short derivation explains why target \(R^2\) and target SNR are interchangeable for a scalar additive model with uncorrelated signal and residual. Since \(\operatorname{Var}(Y)=V_S+V_E\), define \(r=V_S/V_E\). Then
Solving for \(r\) gives \(r=R^2/(1-R^2)\). For example, \(R^2=0.20\) corresponds to SNR \(0.20/0.80=0.250\), not \(0.20\). This identity depends on the additive variance decomposition; it should not be applied uncritically when signal and residual are correlated or when the target is a different, such as feature-recovery, estimand.
Raw coefficient matching is an alternative, but it is meaningful across scenarios only when predictor scales, residual scales, and dependence are held suitably constant. Standardized effects, such as a coefficient expressed per predictor standard deviation and per residual standard deviation, improve scale comparability but do not alone account for correlated predictors or multiple simultaneous signals. Variance explained and SNR summarize total signal relative to residual variation, while component-wise standardized effects describe the size of individual effects. They answer related, not identical, questions.
For count, binary, or otherwise non-Gaussian data, variance can depend on the mean and the distributional parameters. A single variance ratio may still be calculated on a clearly specified analysis scale, but it may not capture all aspects of signal detectability. State whether calibration is on a latent scale, a transformed scale, or the observed scale, and verify it on that scale. Likewise, matching a single overall SNR does not ensure that modalities have matched sparsity, feature-wise heterogeneity, dependence, or practical difficulty.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A centered signal has variance \(0.50\), and independent residual noise has variance \(2.00\). What are the SNR and variance-explained fraction?
- A scalar model has target \(R^2=0.10\) and residual variance \(9\). What signal variance is required?
- Why can the sum of squared coefficients fail to equal signal variance when predictors are correlated?
- Two modalities have identical SNR but different raw signal variances. Is this a contradiction? State one important limitation of the comparison.
Solutions. (1) SNR \(=0.50/2.00=0.250\); the variance-explained fraction is \(0.50/(0.50+2.00)=0.200\). (2) \(V_S=[0.10/(1-0.10)](9)=1.00\). (3) The variance contains covariance terms: \(\operatorname{Var}(X\beta)=\sum_j\beta_j^2\operatorname{Var}(X_j)+2\sum_{j<k}\beta_j\beta_k\operatorname{Cov}(X_j,X_k)\). The terms vanish only when predictors are uncorrelated; unit predictor variances are also needed to reduce the remaining terms to squared coefficients. (4) No. SNR compares signal with residual noise and is unchanged by a common change of measurement scale. But equal SNR does not imply equal sparsity, signal heterogeneity, dependence, or recoverability by a particular method.