Tutorials › Pattern-Mixture and Selection Models › Marginalizing Binary Logistic Fits Across Dropout Patterns

Pattern-Mixture Models for Dropout · Tutorial 225 of 499

Marginalizing Binary Logistic Fits Across Dropout Patterns

Translate pattern-specific logistic predictions into population-level probabilities using explicit pattern weights and covariate standardization.

Advanced 11 min read

What You'll Learn

  • Define a marginal binary-outcome probability across dropout patterns.
  • Combine pattern weights with covariate-standardized logistic predictions.
  • Distinguish a weighted average of probabilities from a weighted average of odds.
  • Calculate marginal treatment contrasts without treating conditional odds ratios as marginal effects.
  • Identify target-population, model, and support assumptions behind the calculation.
  • Recognize common failures in pattern weighting and interpretation.

From Pattern-Specific Predictions to a Population Probability

A binary logistic model fitted within a dropout pattern gives a probability conditional on that pattern and on specified covariates. A population-level probability answers a different question: among a stated target population, what proportion is predicted to have the outcome? To answer it, combine the pattern-specific probabilities using the target population’s pattern proportions. If covariates are also being standardized, average over the target covariate distribution as well.

This distinction matters because a probability is not an odds value, and neither averaging odds nor averaging logistic linear predictors generally produces the population probability. The weighting scheme is part of the estimand: the same pattern-specific fits can yield different summaries for different target populations.

Definition: Let \(G\) denote dropout pattern, with target-population pattern weights \(\pi_g=P(G=g)\), where \(\pi_g\geq 0\) and \(\sum_{g=1}^G\pi_g=1\). Let \(Y\) be a binary outcome and \(X\) a vector of covariates. A pattern-specific logistic model predicts \(p_g(x)=P(Y=1\mid G=g,X=x)=\operatorname{expit}(\eta_g(x))\), where \(\operatorname{expit}(u)=1/(1+\exp(-u))\). For a specified target covariate distribution \(Q\), the marginal probability is \(p_Q=\sum_g\pi_g E_Q[p_g(X)]\). If the target covariate values are \(x_1,\ldots,x_m\) with weights \(q_1,\ldots,q_m\), where \(\sum_jq_j=1\), this becomes \(p_Q=\sum_g\pi_g\sum_jq_jp_g(x_j)\).

When the intended target is the actual joint distribution of patterns and covariates, covariate distributions can differ by pattern. In that case the direct law-of-total-probability expression is \(\sum_g\pi_g E[p_g(X)\mid G=g]\). By contrast, using a common \(Q\) across patterns describes a standardized target that gives each pattern the same covariate distribution. State which target is being used; do not silently substitute one for the other.

The pattern-specific linear predictor may include treatment \(A\), covariates, and pattern-specific coefficients, for example \(\eta_g(a,x)=\alpha_g+\beta_g a+\gamma_g^\mathsf{T}x\). The marginal probability for treatment level \(a\), standardized to a common target, is then \(p_Q(a)=\sum_g\pi_g E_Q[\operatorname{expit}\{\eta_g(a,X)\}]\). This calculation averages predicted probabilities, not coefficients.

Why Probabilities, Not Odds, Are Averaged

The reason follows directly from the law of total probability. For a randomly selected member of the target population, the event \(Y=1\) occurs in exactly one of the mutually exclusive patterns. Therefore,

$$ P(Y=1)=\sum_g P(Y=1\mid G=g)P(G=g) =\sum_g \pi_g p_g. $$

For covariate-standardized predictions, first average within the target covariate distribution and then weight the resulting pattern probabilities. The same identity applies because each component remains a probability of the event. Odds are ratios of event probability to non-event probability, so odds from separate groups do not add in this way.

In general, \(\sum_g\pi_g\{p_g/(1-p_g)\}\) is not the odds corresponding to \(\sum_g\pi_gp_g\). Nor does applying the inverse-logit to an average linear predictor generally recover the average probability: the inverse-logit is nonlinear. These are distinct operations, not alternative algebraic forms of the same marginalization.

Worked Example: Two Patterns and Unequal Predicted Risks

Suppose a hypothetical target population has two dropout patterns. The target weights are \(\pi_1=0.70\) and \(\pi_2=0.30\). At a fixed covariate profile, fitted pattern-specific logistic linear predictors are \(\eta_1=-1\) and \(\eta_2=1\). Calculate the marginal probability and compare it with the result of averaging pattern odds.

The logistic predictions are \(p_1=\operatorname{expit}(-1)=0.268941\) and \(p_2=\operatorname{expit}(1)=0.731059\). The weighted probability is

$$ \begin{aligned} p_Q &=0.70(0.268941)+0.30(0.731059)\\ &=0.188259+0.219318\\ &=0.407577\approx 0.4076. \end{aligned} $$

Thus the model predicts an outcome probability of about 0.4076, or 40.76%, for this target mixture at the specified covariate profile. The corresponding population odds are \(0.407576/(1-0.407576)\approx 0.6880\).

The pattern-specific odds are \(\exp(-1)=0.367879\) and \(\exp(1)=2.718282\). Their weighted average is \(0.70(0.367879)+0.30(2.718282)=1.07300\). Converting that average odds to a probability gives \(1.07300/(1+1.07300)\approx0.5176\), not 0.4076. It answers no population-mixture probability question: it averages ratios rather than adding the pattern probabilities required by the law of total probability.

Standardizing Over Covariates and Comparing Treatments

When covariates vary, evaluate each pattern-specific model at the target covariate values before averaging. For a finite target sample, \(q_j\) can be \(1/m\) for each of \(m\) records, or prespecified weights that represent the desired target population. Pattern weights \(\pi_g\) represent the target pattern composition. These two sets of weights have different jobs: \(q_j\) standardizes covariates, while \(\pi_g\) combines patterns.

Worked Example: A Covariate-Standardized Mixture

Consider two hypothetical patterns with target weights \(\pi_1=0.60\) and \(\pi_2=0.40\), and two target covariate profiles with weights \(q_1=q_2=0.50\). The logistic models predict the following outcome probabilities:

PatternProfile 1Profile 2Within-pattern standardized probability
10.100.300.50(0.10) + 0.50(0.30) = 0.20
20.400.800.50(0.40) + 0.50(0.80) = 0.60

The within-pattern averages are 0.20 and 0.60. Combining them with the target pattern weights gives

$$ p_Q=0.60(0.20)+0.40(0.60)=0.12+0.24=0.36. $$

Equivalently, calculate all four contributions directly: \(0.60(0.50)(0.10)+0.60(0.50)(0.30)+0.40(0.50)(0.40)+0.40(0.50)(0.80)=0.36\). The calculations agree because the weights are applied once for pattern and once for covariate profile.

Averaging the logits first would not implement this calculation. For example, the mean of the two logits for pattern 1 is \(\{\operatorname{logit}(0.10)+\operatorname{logit}(0.30)\}/2\), whose inverse-logit is about 0.179, rather than the average probability 0.20. The desired standardized summary is defined on the probability scale.

For a treatment comparison, calculate a marginal probability separately for each treatment level using the same target covariate distribution and, when the estimand calls for it, the same target pattern weights. Contrasts such as a risk difference or marginal odds ratio are then formed from those marginal probabilities. A pattern-specific treatment coefficient is a conditional log odds ratio under the model; it is not automatically the marginal log odds ratio.

Worked Example: Marginal Treatment Contrast Across Patterns

In a hypothetical analysis, the target pattern weights are 0.65 and 0.35. At a specified target covariate profile, the fitted probabilities under control are 0.20 and 0.60 in patterns 1 and 2; under treatment they are 0.35 and 0.75. Use the same pattern weights for both treatment levels.

The standardized control probability is \(p_Q(0)=0.65(0.20)+0.35(0.60)=0.13+0.21=0.34\). The treatment probability is \(p_Q(1)=0.65(0.35)+0.35(0.75)=0.2275+0.2625=0.49\). The marginal risk difference is \(0.49-0.34=0.15\), or 15 percentage points.

The marginal odds ratio is \((0.49/0.51)/(0.34/0.66)=0.960784/0.515152\approx1.865\). Within pattern 1, the odds ratio is \((0.35/0.65)/(0.20/0.80)\approx2.154\); within pattern 2 it is \((0.75/0.25)/(0.60/0.40)=2.000\). Neither conditional odds ratio is the marginal odds ratio. In this example, the marginal odds ratio is about 1.865 because it is calculated from the two marginal probabilities, not by averaging the pattern-specific odds ratios.

Using a common pattern mix defines a standardized comparison. If instead the question concerns each treatment arm’s naturally occurring population and treatment changes pattern prevalence, the arm-specific pattern weights may differ. That is a different target: its comparison can reflect both within-pattern outcome predictions and changes in pattern composition. The choice should follow the scientific estimand, not convenience.

Assumptions, Diagnostics, and Limitations

The arithmetic of marginalization is exact given its inputs, but the inputs require justification. Before interpreting the result, check the following conditions.

  • Target weights are appropriate. Pattern weights must sum to one and represent the stated target population. If they are estimated from data, their estimation uncertainty matters. Do not use sample pattern proportions for a different target population without justification.
  • The pattern-specific predictions are meaningful. The logistic model must provide adequate conditional probability predictions for the covariate and treatment values being standardized. Strong nonlinearity, omitted interactions, or extrapolation can make predictions unreliable.
  • There is support for the predictions. If a target covariate profile is absent or very rare in a pattern, its pattern-specific prediction may be extrapolated rather than supported by data. Sparse patterns and separation can produce unstable or extreme fitted probabilities.
  • The outcome distribution is addressed for every pattern in the target. In a dropout setting, outcomes may not be observed for everyone in every pattern. A fitted pattern-specific probability for an unobserved outcome depends on the modeling and identification assumptions used to obtain it; weighting predictions does not resolve that issue.
  • The covariate target is explicit. A common covariate distribution across patterns and each pattern’s own covariate distribution generally define different summaries. Document the selected target and the order of standardization and weighting.

Useful checks include verifying that all weights are nonnegative and sum to one, inspecting pattern-specific predicted probabilities for impossible values or extreme concentration near zero and one, and checking whether the target covariate profiles lie within the support of each pattern’s data. Also compare the reported marginal probability with the direct weighted sum of its components. Disagreement usually indicates a coding or weighting error.

Marginalization does not repair a misspecified logistic model, create information in an empty pattern, or settle assumptions about outcomes that are missing. Nor is a marginal odds ratio generally an average of conditional odds ratios; this reflects the nonlinear odds transformation, even when the calculations are performed correctly. Uncertainty in the fitted models, pattern weights, and standardization distribution should be reflected in intervals or tests. A point estimate alone does not show how precise the population summary is.

Common Mistakes and Practical Alternatives

  • Wrong: “Average the pattern odds, then call the result population odds.” Correction: Average probabilities with the target pattern weights, then convert that marginal probability to odds only if odds are the desired scale.
  • Wrong: “Average the logistic coefficients and apply the inverse-logit.” Correction: Evaluate each model’s inverse-logit prediction at the target covariates, then average those probabilities.
  • Wrong: “The conditional treatment odds ratio is the population treatment odds ratio.” Correction: Compute both treatment-specific marginal probabilities under the stated target, then form the requested marginal contrast.
  • Wrong: “The observed pattern proportions are always the right weights.” Correction: Use weights aligned with the estimand and target population; state whether weights are common across arms or arm-specific.

The main alternative summaries answer different questions. A pattern-specific probability describes a particular pattern; a conditional odds ratio compares outcomes within a pattern under the fitted model; and a marginal probability describes a target mixture. Covariate standardization makes the covariate target explicit, while a raw mixture using each pattern’s own covariate distribution retains those pattern-specific covariate compositions. None is universally preferable: report the target and scale that match the question.

Key takeaway: For a binary outcome, the population probability across dropout patterns is the target-weighted sum of pattern-specific predicted probabilities, standardized over the stated covariate distribution. Average probabilities first; derive odds or other contrasts from the resulting marginal probabilities.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Two patterns have weights 0.25 and 0.75 and predicted probabilities 0.20 and 0.60. What is the marginal probability?
  2. Why is the weighted average of pattern-specific odds not generally the odds for the mixture?
  3. In a standardized analysis, what roles do covariate weights and pattern weights play?
  4. Two treatment arms are compared using different pattern weights. What additional feature of the comparison may then contribute to the difference in marginal probabilities?

Solutions. (1) \(0.25(0.20)+0.75(0.60)=0.05+0.45=0.50\). (2) Odds are probability-to-non-event ratios; the law of total probability adds weighted event probabilities, not those ratios. Convert the marginal probability to odds afterward if needed. (3) Covariate weights average predictions over the stated target covariate distribution within each pattern; pattern weights combine those pattern-level averages into the target mixture. (4) The arm-specific pattern composition can contribute, so the contrast may reflect both within-pattern outcome differences and differences in pattern prevalence.

Clinical Biostats