Tutorials › Generalized Linear Models › Masking And Swamping In Multiple-Case Deletion

Leverage and Influence · Tutorial 772 of 981

Masking And Swamping In Multiple-Case Deletion

Use joint deletion and subset comparisons to distinguish group influence from misleading case-by-case flags.

Advanced 10 min read

What You'll Learn

  • Define masking and swamping through comparisons of individual and joint case deletion.
  • Measure coefficient changes using a fixed full-model information matrix.
  • Derive a first-order GLM approximation to the effect of deleting a subset.
  • Obtain the exact deletion formula for a Gaussian intercept-only model.
  • Diagnose masking, swamping, and cancellation in worked numerical examples.

Why Multiple-Case Deletion Matters

A case-by-case influence analysis can miss an influential group. If several observations pull the fitted model in a similar direction, each may appear modest when deleted alone even though deleting them together changes the fit substantially. The reverse can also happen: a genuinely unusual group can distort the fitted model enough that ordinary observations look influential by comparison. These are called masking and swamping.

The central diagnostic question is therefore not only “What changes when case \(i\) is deleted?” but also “What changes when a proposed set \(S\) is deleted, and how do the individual and joint changes compare?” The answer depends on the fitted model, the parameter scale, and the cutoff used to flag a change. A flag is a screening signal, not a proof that an observation is erroneous or should be removed.

Subset Deletion and a Coefficient-Change Measure

Definition: Let \(\hat{\beta}\) be the fitted coefficient vector using all \(n\) independent observations. For a set of indices \(S\), let \(\hat{\beta}_{(-S)}\) be the coefficient estimate after deleting every observation in \(S\) and refitting the same model. The joint deletion change is \(\Delta_S=\hat{\beta}_{(-S)}-\hat{\beta}\). A single-case deletion is the special case \(S=\{i\}\).

To compare changes across coefficient scales, use the observed coefficient information matrix at the full-data fit, \(J(\hat{\beta})=-\partial^2\ell(\beta)/\partial\beta\,\partial\beta^\mathsf{T}\vert_{\hat{\beta}}\). Assume it is positive definite. One possible dimensionless measure is \(D(S)=\Delta_S^\mathsf{T}J(\hat{\beta})\Delta_S\), with \(\sqrt{D(S)}\) reporting the change in information-scaled units. This tutorial uses that fixed full-fit reference for comparisons. Other diagnostics may use a different scaling; comparisons are meaningful only when the same scaling rule is applied consistently.

Definition: Relative to a chosen screening cutoff \(c\), a set \(S\) exhibits masking when its members’ individual deletion changes are below \(c\), but its joint deletion change exceeds \(c\). Swamping occurs when cases outside a genuinely influential set are flagged in the full-data analysis but cease to be flagged after that set is removed and the influence assessment is repeated. Both terms describe cutoff-dependent diagnostic behavior, not formal hypothesis tests.

The cutoff is a practical screening choice, not a universal constant. In particular, a collection of modest individual changes need not add up to a large joint change: their directions may differ, and the information matrix changes when observations are deleted. Conversely, several changes in a similar direction can accumulate. For that reason, inspect candidate subsets and their complements rather than treating a ranked list of single-case diagnostics as a complete analysis.

Worked Example: Two Cases Mask One Another

Consider a Gaussian intercept-only model with known variance \(\sigma^2=16\), so the fitted coefficient is the sample mean. The five responses are \(0,0,0,6,6\). Use \(\sqrt{D(S)}\) with the full-fit information and, purely for illustration, flag values above \(c=1\).

The full-data estimate is \(\hat{\beta}=12/5=2.4\). The coefficient information is \(J=5/16\). Deleting either one of the two responses equal to 6 leaves a mean of \(6/4=1.5\), so the change is \(-0.9\). Thus \(\sqrt{D(\{i\})}=\sqrt{(5/16)(0.9)^2}=\sqrt{0.253125}\approx0.503\), below the illustrative cutoff.

Deleting both responses equal to 6 leaves three zeros, giving \(\hat{\beta}_{(-S)}=0\) and \(\Delta_S=-2.4\). Therefore \(\sqrt{D(S)}=\sqrt{(5/16)(2.4)^2}=\sqrt{1.8}\approx1.342\), above the cutoff. Each case looks modest alone, but the pair has a substantial joint effect: this is masking under the stated rule.

Why the Joint Change Is Not a Sum of Single-Case Changes

The likelihood for independent observations is additive, which gives a useful first-order approximation for deleting a set. Write \(U(\beta)=\partial\ell(\beta)/\partial\beta\) for the full score and \(U_i(\beta)\) for observation \(i\)’s score contribution. Let \(U_{(-S)}(\beta)=\sum_{i\notin S}U_i(\beta)\). At an interior full-data maximum, \(U(\hat{\beta})=0\), so the deleted-data score at the original estimate is the negative of the contributions from the deleted cases.

Result (first-order subset-deletion approximation): Suppose the full and deleted log-likelihoods are twice continuously differentiable near \(\hat{\beta}\), \(U(\hat{\beta})=0\), and \(J_{(-S)}(\hat{\beta})=-\partial U_{(-S)}(\beta)/\partial\beta^\mathsf{T}\vert_{\hat{\beta}}\) is nonsingular. If \(\hat{\beta}_{(-S)}=\hat{\beta}+\Delta_S\) is close to \(\hat{\beta}\), then \(\Delta_S\approx-[J_{(-S)}(\hat{\beta})]^{-1}\sum_{i\in S}U_i(\hat{\beta})\). If the deleted score has a locally Lipschitz derivative, the Taylor remainder is of order \(\|\Delta_S\|^2\).

Proof. Additivity of the score and \(U(\hat{\beta})=0\) give \[ U_{(-S)}(\hat{\beta})=U(\hat{\beta})-\sum_{i\in S}U_i(\hat{\beta}) =-\sum_{i\in S}U_i(\hat{\beta}). \] By Taylor expansion around \(\hat{\beta}\), the deleted score at the refitted estimate satisfies \[ 0=U_{(-S)}(\hat{\beta}+\Delta_S) =U_{(-S)}(\hat{\beta})-J_{(-S)}(\hat{\beta})\Delta_S+r(\Delta_S). \] When the derivative of the score is locally Lipschitz, \(\|r(\Delta_S)\|\leq C\|\Delta_S\|^2\) in a sufficiently small neighborhood, for some finite \(C\). Rearranging and using nonsingularity yields \[ \Delta_S=-[J_{(-S)}(\hat{\beta})]^{-1}\sum_{i\in S}U_i(\hat{\beta}) +[J_{(-S)}(\hat{\beta})]^{-1}r(\Delta_S). \] The last term is second order in the deletion change, which proves the stated first-order approximation. The approximation need not be accurate for a large deletion or a poorly conditioned deleted fit. \(\square\)

This result gives a useful interpretation: subset deletion depends on the sum of the deleted cases’ score contributions, scaled by the information remaining after deletion. It is not generally obtained by adding single-case deletion changes. The deleted information matrix differs from the full information matrix, and refitting is nonlinear in general. Thus a one-case approximation is a screening aid, not a substitute for a joint refit when the subset may have a large effect.

An Exact Formula in the Intercept-Only Gaussian Model

Result (exact subset-deletion formula): For independent Gaussian responses with a common known variance and an intercept-only mean model, let \(\bar{y}\) be the full-data mean, and let \(S\) contain \(m<n\) observations. Then \[ \bar{y}_{(-S)}-\bar{y} =-\frac{\sum_{i\in S}(y_i-\bar{y})}{n-m}. \]

Proof. The full-data estimate is \(\bar{y}=n^{-1}\sum_{i=1}^n y_i\), so the sum of the responses not in \(S\) is \(n\bar{y}-\sum_{i\in S}y_i\). The deleted-data mean is therefore \[ \bar{y}_{(-S)}=\frac{n\bar{y}-\sum_{i\in S}y_i}{n-m}. \] Subtracting \(\bar{y}\), putting both terms over the denominator \(n-m\), and simplifying gives \[ \bar{y}_{(-S)}-\bar{y} =\frac{m\bar{y}-\sum_{i\in S}y_i}{n-m} =-\frac{\sum_{i\in S}(y_i-\bar{y})}{n-m}. \] This proves the formula. \(\square\)

The numerator is the sum of the deleted observations’ deviations from the full mean. Similar deviations can accumulate, producing masking. Deviations with opposite signs can cancel, so a set can have a small joint effect even when its members have large individual effects.

Worked Example: Ordinary Cases Swamped by One Extreme Case

Again use a Gaussian intercept-only model with known variance \(16\). This time the responses are \(0,0,0,0,8\). The full mean is \(8/5=1.6\), and the full-fit information is \(5/16\). Use the illustrative cutoff \(c=0.2\) for \(\sqrt{D}\).

Deleting any one of the four zero responses leaves the mean \(8/4=2\), a change of \(0.4\). Its scaled change is \(\sqrt{D}=\sqrt{(5/16)(0.4)^2}=\sqrt{0.05}\approx0.224\), so each zero is flagged under this cutoff. Deleting the response 8 leaves mean 0, a change of \(-1.6\), with \(\sqrt{D}=\sqrt{(5/16)(1.6)^2}=\sqrt{0.8}\approx0.894\).

The zeros are identical and do not pull the fit away from their common value. To check whether their flags arise in the presence of the 8, remove that case and repeat the comparison: the remaining mean is 0, and deleting any one zero still leaves mean 0. Each zero’s deletion change is then 0, below the same cutoff. In this comparison, the response 8 makes ordinary cases appear influential; that is swamping. The numerical flags depend on the illustrative cutoff, but the before-and-after comparison makes the source of the apparent influence clear.

Worked Example: Opposing Cases Cancel Under Joint Deletion

For a third Gaussian intercept-only example, take known variance \(\sigma^2=4\) and responses \(-5,0,0,5\). The full mean is 0, so \(J=4/4=1\). Deleting \(5\) leaves mean \(-5/3\); deleting \(-5\) leaves mean \(5/3\). Each single-case deletion has \(\sqrt{D}=|5/3|\approx1.667\).

Now delete the two extremes together. The remaining responses are \(0,0\), whose mean is still 0. Hence \(\Delta_S=0\) and \(\sqrt{D(S)}=0\). The individual changes are large but point in opposite directions; they cancel in the joint comparison. This is why a group should not be labelled influential merely because its members have large individual deletion diagnostics.

A Practical Subset-Comparison Workflow

Joint deletion is most useful when guided by a diagnostic question: do several cases share a design pattern, a response discrepancy, or a data-collection feature that could cause their effects to reinforce or cancel? A broad search over every possible subset can be computationally expensive and can produce chance flags. Start with plausible groups suggested by the data and subject matter, then verify the effect by refitting.

1
Screen individual cases.
Use a consistent coefficient-change measure to identify cases or patterns worth investigating. Treat the screening result as a prompt for comparison, not a final classification.
2
Specify candidate subsets.
State which cases form each set and why they should be compared jointly. Avoid defining a group solely because it produces a large change.
3
Refit after deleting the full set.
Calculate \(\hat{\beta}_{(-S)}\) and compare it with \(\hat{\beta}\) using the same stated scale. Do not infer the joint result by summing single-case results.
4
Check for masking or swamping.
Compare joint and individual changes. For possible swamping, remove the suspected influential set and reassess the cases that were flagged in the original fit.
5
Interpret the change in context.
Inspect which coefficients and fitted quantities move, and investigate data quality and model adequacy before deciding how to report the sensitivity.

Common Pitfall and Interpretation

A common mistake is to conclude that a group is harmless because none of its members exceeds a single-case cutoff. That reasoning ignores masking: several modest, similarly directed effects may produce a substantial joint change. The correction is to perform a joint deletion and refit for plausible groups. The opposite mistake is to assume every case flagged in the full model is genuinely influential. Swamping can make ordinary cases look influential while a more extreme case distorts the comparison; check whether those flags persist after removing the suspected influential set.

Neither comparison justifies automatic deletion. The cases may be valid observations, and a large change can reveal a model that is sensitive to an important part of the data. Report the subset considered, the refitting procedure, the coefficient or fitted quantities that changed, and the scale used for comparison. This keeps a diagnostic finding distinct from a decision about data validity or model choice.

Check Your Understanding

Use the definitions and comparisons above to answer these questions.

  1. What comparison distinguishes masking from an ordinary large single-case deletion change?
  2. Why does the first-order subset-deletion approximation require the information matrix after deletion?
  3. In the exact intercept-only formula, what happens to the joint deletion change when the deleted observations’ deviations from the full mean sum to zero?
  4. In the swamping example, why were the zero responses not influential when reassessed after deleting the response 8?
  5. Why should a flagged subset be refitted rather than assessed by simply adding its single-case deletion changes?
Clinical Biostats