Tutorials › Pattern-Mixture and Selection Models › Code Pattern-Mixture Identifying Restrictions

Software and Workflow · Tutorial 466 of 499

Code Pattern-Mixture Identifying Restrictions

Map each missing outcome to its identifying reference distribution, then check that the chosen restriction is estimable and correctly encoded.

Intermediate 11 min read

What You'll Learn

  • Define monotone dropout patterns using the last observed visit.
  • Map missing outcomes to complete-case, neighboring-pattern, or available-case conditional distributions.
  • Implement a recursive neighboring-case restriction across visits.
  • Calculate how restrictions can imply different missing-outcome distributions.
  • Check support, conditional-model fit, and pattern coding before using a restriction.
  • Distinguish identifying restrictions from assumptions guaranteed by the observed data.

From Dropout Patterns to Identifying Restrictions

A pattern-mixture analysis describes the outcome distribution separately for each observed missingness pattern. The data identify distributions of outcomes that were observed; they do not, by themselves, identify the distributions of outcomes missing within a pattern. A coding restriction supplies the link between those missing distributions and outcome distributions that can be estimated from observed data. The practical task is to make that link explicit for every pattern and every missing visit.

Consider \(T\) scheduled visits with outcomes \(Y_1,\ldots,Y_T\), and assume monotone dropout: once a participant misses a visit because of dropout, later outcomes are also unobserved. Let \(R=r\) mean that the last observed outcome is at visit \(r\), for \(r=1,\ldots,T\). Thus, \(R=T\) denotes a completer. Let \(X\) denote baseline covariates and let \(H_{t-1}=(Y_1,\ldots,Y_{t-1})\) denote the outcome history before visit \(t\). A restriction should generally be stated conditional on the relevant observed history and covariates, rather than as an unconditional equality that ignores them.

Definition: For a participant with pattern \(R=r<T\), the unobserved outcomes are \(Y_{r+1},\ldots,Y_T\). An identifying restriction specifies their conditional distribution given \(X\) and the observed history \(H_r\), using distributions estimated from one or more patterns in which the relevant outcomes are observed.

For implementation, define \(g_{a,t}(y_t\mid H_{t-1},X)\) as the conditional distribution of \(Y_t\) among participants with pattern \(R=a\), where \(a\geq t\) so that visit \(t\) is observed in that pattern. An available-case distribution can be written \(g_{\geq t,t}\): it is estimated using all participants with \(R\geq t\), who have an observed outcome at visit \(t\). These distributions may be represented by fitted conditional models rather than empirical proportions. The restriction concerns which observed-data distribution is used; it does not prescribe a particular model family.

Three Ways to Specify the Reference Distribution

The following rules describe conditional outcome distributions visit by visit. This makes them implementable and avoids ambiguity about how a block of missing outcomes is generated.

RestrictionReference for a missing \(Y_t\)Practical meaning
Complete-case\(g_{T,t}(y_t\mid H_{t-1},X)\)Use the conditional outcome distribution estimated among participants observed through the final visit.
Available-case\(g_{\geq t,t}(y_t\mid H_{t-1},X)\)Use the conditional distribution among all participants whose outcome at visit \(t\) is observed.
Neighboring-caseFor pattern \(r\), use \(g_{r+1,r+1}\) for its first missing outcome, then apply the same rule recursively to the next pattern.Borrow the next outcome from the adjacent pattern that remains observed one visit longer, and continue the pattern-to-pattern mapping.

More formally, under the complete-case restriction, the conditional distribution of the missing block for pattern \(r\) is

$$ q_r(y_{r+1:T}\mid H_r,X) = \prod_{t=r+1}^{T}g_{T,t}(y_t\mid H_{t-1},X). $$

Under the available-case restriction, replace \(g_{T,t}\) by \(g_{\geq t,t}\) at each visit. For the neighboring-case restriction, define \(q_T\) as an empty future block. Then recursively set

$$ q_r(y_{r+1:T}\mid H_r,X) = g_{r+1,r+1}(y_{r+1}\mid H_r,X)\, q_{r+1}(y_{r+2:T}\mid H_{r+1},X), \qquad r=T-1,\ldots,1. $$

The recursion matters. A pattern with last observation at \(r\) can use pattern \(r+1\) to model \(Y_{r+1}\), because that outcome is observed there. Its later missing outcomes are then handled by the restriction for pattern \(r+1\). Simply assigning the entire missing block to pattern \(r+1\) would be incorrect: that pattern does not observe outcomes after visit \(r+1\).

Assumptions and a Short Justification

These restrictions are identifying assumptions, not consequences of monotone dropout or of the observed data. Their validity depends on whether the chosen reference distribution is a credible representation of the missing outcomes, conditional on the history and covariates used in the model. In particular, the reference patterns must contain enough information to estimate the needed conditional distributions. Conditional histories used for prediction should have adequate support in the reference data, and the fitted outcome models should be appropriately specified. If relevant histories are absent or very sparse in a reference pattern, the model is extrapolating.

The factorization explains how a visit-by-visit mapping identifies a joint missing block. By the conditional probability chain rule, any joint distribution of the future outcomes can be written as a product of successive conditional distributions:

$$ f(y_{r+1:T}\mid H_r,X,R=r) = \prod_{t=r+1}^{T} f(y_t\mid H_{t-1},X,R=r). $$

The observed data do not identify the factors on the right for pattern \(r\), because those outcomes are missing there. A restriction replaces each factor with a specified observed-data conditional distribution. For example, complete-case restriction substitutes \(g_{T,t}\) for every factor. The product then defines a normalized joint distribution, provided each substituted conditional distribution is itself valid. This justifies sequential generation of the missing outcomes; it does not prove that the selected restriction is substantively correct.

Worked Example: Building the Pattern-to-Source Map

Suppose a hypothetical study has four visits and monotone dropout. A participant with \(R=2\) has observed \(Y_1,Y_2\), while \(Y_3,Y_4\) are missing. State the reference distributions for those missing outcomes under each restriction.

Complete-case. Both missing outcomes are referenced to completers: use \(g_{4,3}(Y_3\mid H_2,X)\), followed by \(g_{4,4}(Y_4\mid H_3,X)\). In the second distribution, \(H_3\) includes the generated value of \(Y_3\).

Available-case. Use \(g_{\geq 3,3}(Y_3\mid H_2,X)\), estimated among participants observed at visit 3, then \(g_{\geq 4,4}(Y_4\mid H_3,X)\). Under monotone dropout, the latter source consists of completers.

Neighboring-case. First use \(g_{3,3}(Y_3\mid H_2,X)\), because pattern \(R=3\) observes visit 3. Then use the recursively defined restriction for pattern \(R=3\) to generate \(Y_4\), which uses \(g_{4,4}(Y_4\mid H_3,X)\). The map for the missing block is therefore pattern 3 for \(Y_3\), followed by pattern 4 for \(Y_4\).

Worked Numerical Comparison

Worked Example: Different Restrictions, Different Implied Probabilities

Suppose, hypothetically, we condition on a fixed baseline-covariate and \(Y_1\) history stratum in a three-visit study. Among participants with \(R=2\), 10 of 20 observed \(Y_2=1\). Among completers with \(R=3\), 6 of 20 have \(Y_2=1\). Thus the available-case estimate for \(Y_2\), pooling all 40 participants observed at visit 2, is also calculated from these counts. Among completers, suppose the fitted conditional probabilities are \(P(Y_3=1\mid Y_2=0)=0.20\) and \(P(Y_3=1\mid Y_2=1)=0.60\). Compare the implied probability that \(Y_3=1\) for pattern \(R=1\).

For complete-case restriction, \(P(Y_2=1\mid R=1)\) is set to the complete-case proportion \(6/20=0.30\). The later outcome uses the stated complete-case conditional probabilities. Therefore,

$$ P(Y_3=1\mid R=1) =(0.30)(0.60)+(0.70)(0.20) =0.18+0.14 =0.32. $$

For available-case restriction, the visit-2 source includes both patterns observed at visit 2. Its estimated probability is \((10+6)/(20+20)=16/40=0.40\). At visit 3, only completers have observed outcomes, so the available-case conditional distribution for \(Y_3\) is the same as the complete-case conditional distribution in this example. Thus,

$$ P(Y_3=1\mid R=1) =(0.40)(0.60)+(0.60)(0.20) =0.24+0.12 =0.36. $$

For neighboring-case restriction, the distribution of \(Y_2\) for pattern \(R=1\) comes from pattern \(R=2\): \(10/20=0.50\). The conditional distribution for \(Y_3\) is then supplied recursively by completers. Hence,

$$ P(Y_3=1\mid R=1) =(0.50)(0.60)+(0.50)(0.20) =0.30+0.10 =0.40. $$

The three results, 0.32, 0.36, and 0.40, are not competing estimates of one quantity identified by these observed counts. They are implications of three different restrictions for outcomes missing in pattern \(R=1\). The arithmetic assumes the supplied conditional probabilities apply within the stated history stratum; outside that stratum, each conditional model must be fitted and assessed for its own support.

Implementing and Checking the Mapping

A reproducible implementation should store the mapping as part of the analysis specification rather than burying it in separate model-fitting code. For each missing outcome, retain the pattern being completed, the visit, the source pattern or source pool, the conditioning variables, and the fitted distribution used. A useful workflow is:

1
Verify the pattern coding.
Confirm that \(R=r\) means outcomes through visit \(r\) are observed, and that no later outcome is observed under the monotone-dropout coding.
2
List every missing visit by pattern.
For each \(r<T\), enumerate \(r+1,\ldots,T\); do not assume a single restriction applies to the whole block without checking its visit-specific mapping.
3
Assign the reference distribution.
Apply the chosen complete-case, available-case, or recursive neighboring-case rule, conditional on the specified observed history and covariates.
4
Check estimability before generating outcomes.
Inspect source-pattern counts, outcome variation, and overlap in histories. Record sparse or unsupported combinations as extrapolation risks.
5
Audit the generated mapping.
For each pattern and visit, verify that the selected source observes that visit and that its conditioning variables are available at the point of generation.

Worked Example: Auditing a Four-Visit Neighboring-Case Map

A hypothetical data set has patterns \(R=1,2,3,4\). A proposed implementation assigns the missing visits for an \(R=1\) participant as follows: draw \(Y_2\) from pattern 2, \(Y_3\) from pattern 3, and \(Y_4\) from pattern 4. Check whether this is a valid neighboring-case implementation.

The source for \(Y_2\) is valid because pattern 2 observes \(Y_2\). The source for \(Y_3\) also observes \(Y_3\), and the source for \(Y_4\) observes \(Y_4\). But the direct assignment alone does not fully define the conditional distributions: the \(Y_3\) model must condition on the generated \(Y_2\), and the \(Y_4\) model must condition on both generated outcomes \(Y_2,Y_3\), as well as the appropriate baseline covariates. Otherwise, the code has specified only marginal source patterns, not the required sequential joint distribution.

The complete recursive map is: generate \(Y_2\) from \(g_{2,2}(Y_2\mid H_1,X)\); generate \(Y_3\) from \(g_{3,3}(Y_3\mid H_2,X)\); and generate \(Y_4\) from \(g_{4,4}(Y_4\mid H_3,X)\). If the implementation instead conditions the \(Y_4\) model on an observed value of \(Y_3\) that is unavailable for this participant, it is using information not present at that stage and is incorrectly coded.

Diagnostics, Alternatives, and Limits

Several failures can be detected before interpreting results. A source pattern with no participants, no outcome variation for a categorical outcome, or very few observations in important history strata cannot support a stable conditional distribution. Extreme fitted probabilities, unstable coefficients, poor conditional fit, and predictions outside plausible ranges are warning signs. For continuous outcomes, inspect residual behavior and the plausibility of conditional predictions; for binary outcomes, inspect calibration and sparse strata. Also check that conditioning on the generated history is implemented consistently across the sequence.

The alternatives differ in which observed participants anchor the missing-outcome distributions. Complete-case restriction is simple, but may depend heavily on a small completer group and requires its conditional distributions to be relevant for every dropout pattern. Available-case restriction uses more observations at earlier visits, but its reference group changes by visit and may mix patterns with different histories or prognosis. Neighboring-case restriction uses the adjacent pattern for each next missing outcome, making the pattern relationship explicit; however, adjacent patterns can also be small, and recursive uncertainty or model misspecification can propagate through later visits. None is automatically preferable in every application.

A common mistake is to say, “The outcome was observed in the complete cases, so the complete-case distribution is the correct distribution for every dropout pattern.” Observation in completers makes that distribution estimable; it does not establish that it represents outcomes for participants who dropped out. The correction is to describe the restriction as an assumption, state the conditioning variables and reference patterns, and examine how conclusions depend on that choice. These restrictions do not, on their own, resolve intermittent missingness, nonmonotone observation patterns, or lack of overlap; those require an explicitly adapted pattern definition and modeling strategy.

Key takeaway: A restriction is correctly coded only when every missing visit has a stated, estimable reference distribution conditional on the available history. Save and inspect that mapping; do not treat the name of a restriction as a substitute for its operational definition.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. With four visits, what does \(R=3\) mean, and which outcomes are missing under monotone dropout?
  2. For available-case restriction, which patterns can contribute to estimating the visit-2 outcome distribution?
  3. In a three-visit study, why does neighboring-case restriction for an \(R=1\) participant require recursion after generating \(Y_2\)?
  4. A complete-case reference model has no observations for a particular history stratum. What is the implementation concern?

Solutions. (1) \(R=3\) means \(Y_1,Y_2,Y_3\) are observed and \(Y_4\) is missing. (2) Patterns \(R=2,3,4\) can contribute because each observes visit 2. (3) Pattern \(R=2\) observes \(Y_2\) but not \(Y_3\), so the later missing outcome needs its own reference distribution, supplied recursively by the restriction for pattern 2. (4) The conditional distribution is unsupported in that stratum, so the fit must extrapolate; assess and report that limitation rather than treating the resulting prediction as directly data-supported.

Clinical Biostats