Tutorials › Pattern-Mixture and Selection Models › Subject Contributions to the Observed Selection Likelihood

Local Influence · Tutorial 144 of 499

Subject Contributions to the Observed Selection Likelihood

Learn to build a subject’s likelihood contribution by combining the outcome density with the probability of that subject’s response history, then integrating over outcomes that were not observed.

Advanced 11 min read

What You'll Learn

  • Write a subject-level observed-data likelihood under a joint outcome and response model.
  • Integrate or sum over missing outcomes before taking logarithms.
  • Handle complete, monotone-dropout, intermittent, and fully missing response histories.
  • Check that response-history probabilities are normalized and contributions are well-defined.
  • Distinguish the observed selection likelihood from a complete-case likelihood.

Why Subject Contributions Require Integration

In a selection model, a subject’s response history can depend on the outcomes themselves. Consequently, the likelihood for the observed record must account both for the probability of the outcomes and for the probability that this particular response history occurred. If some outcomes are missing, the likelihood contribution averages over their possible values rather than pretending they were observed or discarding the subject.

This construction is the building block of the observed-data likelihood. Its form changes with the subject’s response history: a complete record needs no integration, a dropout record may require integrating over a missing tail, and an intermittent pattern requires integrating over whichever outcomes are missing. The same rule covers a record with no observed outcomes.

Definition: For subject \(i\), let \(Y_i=(Y_{i1},\ldots,Y_{iT})\) denote the full outcome vector, \(R_i=(R_{i1},\ldots,R_{iT})\) the response-history vector, and \(x_i\) the observed covariates. Here \(R_{it}=1\) means \(Y_{it}\) is observed and \(R_{it}=0\) means it is missing. Let \(f_\theta(y_i\mid x_i)\) be the joint outcome density or probability mass function and \(g_\psi(r_i\mid y_i,x_i)\) the conditional probability of the response history. The observed-data contribution is $$ L_i(\theta,\psi)=\int f_\theta(y_{i,\mathrm{obs}},y_{i,\mathrm{mis}}\mid x_i)\, g_\psi(r_i\mid y_{i,\mathrm{obs}},y_{i,\mathrm{mis}},x_i)\,d y_{i,\mathrm{mis}}. $$ The integral denotes the appropriate sum when missing outcomes are discrete, and a sum-integral when they are mixed. If there are no missing outcomes, \(L_i=f_\theta(y_i\mid x_i)g_\psi(r_i\mid y_i,x_i)\).

The displayed expression uses the density or mass of the full outcome vector, evaluated at the observed outcomes and integrated over the missing ones. The response probability is evaluated at those same full outcomes inside the integral. This placement matters: when response depends on a missing outcome, its value is unknown and must be averaged over as part of the likelihood.

Deriving the Observed-Data Contribution

The subject’s observed record consists of the response history \(r_i\) and the outcomes recorded under that history. Under the joint model, the density or mass for a full outcome vector together with that response history is \(f_\theta(y_i\mid x_i)g_\psi(r_i\mid y_i,x_i)\). To obtain the probability density or mass for the observed record alone, sum or integrate this joint quantity over every full outcome vector consistent with the observed values. That operation gives \(L_i(\theta,\psi)\).

This argument also explains why the log must be taken after the integration. The observed-data log-likelihood is

$$ \ell(\theta,\psi)=\sum_{i=1}^{n}\log L_i(\theta,\psi), $$

when subjects are independent conditional on their covariates and the model parameters. The individual likelihood contribution is an average (or sum) of joint-model quantities over missing outcomes; in general, the logarithm of that average is not the average of their logarithms.

Assumptions for this construction: The outcome model and response model define a valid joint distribution: \(f_\theta\) is normalized over possible outcomes, and \(g_\psi(\cdot\mid y_i,x_i)\) assigns nonnegative probabilities summing to one over possible response histories for each full \(y_i,x_i\). The observed outcomes, response indicators, and covariates are recorded as specified by the model. The product form for the full sample likelihood additionally assumes independent subjects conditional on the modeled covariates and parameters. A different dependence structure requires a corresponding joint likelihood.

Response Histories and Their Integrals

With two outcomes, the response histories \(11\), \(10\), \(01\), and \(00\) represent, respectively, both outcomes observed, only the first observed, only the second observed, and neither observed. In a longer monotone-dropout record, \(R_i=(1,\ldots,1,0,\ldots,0)\); the missing coordinates are the unobserved tail. With intermittent missingness, the missing coordinates need not form a tail. The general likelihood formula does not change: the pattern determines which coordinates are held at their observed values and which are integrated out.

A response model may be specified directly for the full history or factorized into conditional response probabilities. For example, with two measurements one valid sequential factorization is

$$ g_\psi(r_i\mid y_i,x_i) =P(R_{i1}=r_{i1}\mid y_i,x_i) P(R_{i2}=r_{i2}\mid R_{i1}=r_{i1},y_i,x_i). $$

This factorization permits the chance of the second response to differ according to whether the first response occurred. Whatever parameterization is used, the resulting probabilities for all possible histories must sum to one conditional on each full outcome vector and covariate value.

Worked Example: A Complete Two-Outcome Record

Consider a hypothetical subject with two binary outcomes. Suppose the outcome model makes \(Y_{i1}\) and \(Y_{i2}\) independent, with \(P(Y_{i1}=1)=0.6\) and \(P(Y_{i2}=1)=0.4\). For the response model, let \(P(R_{i1}=1\mid y_i)=a(y_{i1})\), where \(a(1)=0.8\) and \(a(0)=0.5\). Given \(R_{i1}\) and \(y_i\), let \(P(R_{i2}=1\mid R_{i1}=1,y_i)=b(y_{i2})\), where \(b(1)=0.9\) and \(b(0)=0.6\). Suppose the subject has \(y_i=(1,0)\) and \(r_i=(1,1)\).

There are no missing outcomes, so the contribution is the outcome probability multiplied by the probability of the observed history at that outcome vector:

$$ L_i=P(Y_{i1}=1)P(Y_{i2}=0)\,a(1)b(0) =(0.6)(0.6)(0.8)(0.6)=0.1728. $$

Thus this complete record contributes \(0.1728\) to the likelihood under the stated hypothetical model. The response factor is not omitted merely because both outcomes are observed: the likelihood includes the probability of the observed response history as well as the outcome probability.

Worked Example: A Monotone Dropout Record

Use the same hypothetical model. Suppose this subject has \(R_i=(1,0)\), with \(Y_{i1}=1\) observed and \(Y_{i2}\) missing. For a second response failure after \(R_{i1}=1\), the conditional probability is \(1-b(y_{i2})\). The likelihood contribution is therefore a sum over the two possible values of the missing binary outcome:

$$ L_i=\sum_{y_{i2}=0}^{1}P(Y_{i1}=1)P(Y_{i2}=y_{i2})a(1)\{1-b(y_{i2})\}. $$

For \(y_{i2}=1\), the term is \((0.6)(0.4)(0.8)(1-0.9)=0.0192\). For \(y_{i2}=0\), the term is \((0.6)(0.6)(0.8)(1-0.6)=0.1152\). Adding the terms gives

$$ L_i=0.0192+0.1152=0.1344. $$

The missing second outcome affects the contribution in two ways: its outcome probability is included, and it changes the probability of observing \(R_{i2}=0\). Treating the missing outcome as known to be zero, or omitting the response probability, would give a different and unjustified likelihood contribution.

Worked Example: Intermittent and Fully Missing Histories

Continue with the same binary outcome model. Let \(P(R_{i2}=1\mid R_{i1}=0,y_i)=c(y_{i2})\), with \(c(1)=0.4\) and \(c(0)=0.2\). For history \(R_i=(0,1)\), the first response probability is \(1-a(y_{i1})\), and the second response probability is \(c(y_{i2})\). Suppose \(Y_{i2}=1\) is observed while \(Y_{i1}\) is missing. Summing over \(y_{i1}\) gives

$$ \begin{aligned} L_i &=P(Y_{i2}=1)\sum_{y_{i1}=0}^{1}P(Y_{i1}=y_{i1}) \{1-a(y_{i1})\}c(1)\\ &=(0.4)\{(0.6)(0.2)(0.4)+(0.4)(0.5)(0.4)\}\\ &=(0.4)(0.048+0.080)=0.0512. \end{aligned} $$

For a subject with neither outcome observed and history \(R_i=(0,0)\), both outcomes must be summed over. The response probability is \(\{1-a(y_{i1})\}\{1-c(y_{i2})\}\). The four terms are

$$ \begin{aligned} L_i={}&(0.6)(0.4)(0.2)(0.6) +(0.6)(0.6)(0.2)(0.8)\\ &+(0.4)(0.4)(0.5)(0.6) +(0.4)(0.6)(0.5)(0.8)\\ ={}&0.0288+0.0576+0.0480+0.0960=0.2304. \end{aligned} $$

Both calculations use the same rule as the dropout example. The pattern determines which outcomes remain fixed at their observed values and which must be summed out.

Useful Checks and Common Failure Modes

Before evaluating contributions numerically, check the model and the pattern-specific calculation. These checks do not prove that a model is scientifically adequate, but they can reveal errors in the likelihood construction or its numerical evaluation.

  • Normalize the response model. For fixed \(y_i,x_i\), the probabilities over all response histories must add to one. In the two-outcome sequential example, the four histories have probabilities \(ab\), \(a(1-b)\), \((1-a)c\), and \((1-a)(1-c)\), whose sum is \(a+(1-a)=1\).
  • Check the integration domain. Every missing coordinate should be summed or integrated over its full modeled support; every observed coordinate should remain fixed at its recorded value.
  • Check numerical stability. For continuous missing outcomes, numerical integration may be needed. Compare accuracy under tighter tolerances or a more accurate quadrature rule, and verify that contributions are nonnegative and finite. Inadequate integration can distort the likelihood even when its algebraic form is correct.
  • Check pattern coding. A reversed indicator convention or a swapped history can replace a response probability with its complement. Confirm that each factor corresponds to the recorded history.

Common mistake: “The outcome is missing, so I will insert a convenient value and evaluate the joint density there.” That treats an unobserved value as if it had been recorded. The correct contribution sums or integrates the joint outcome-response quantity over all possible missing values. A related mistake is to take the logarithm inside the integral; the observed likelihood requires \(\log\{\int f_\theta g_\psi\}\), not \(\int \log(f_\theta g_\psi)\).

How This Likelihood Differs from Alternatives

A complete-case analysis uses only subjects whose required outcomes are observed. It can be simpler, but it does not use the observed selection likelihood for incomplete records and need not target the same likelihood-based inference. The selection likelihood instead represents both the outcome distribution and the response process, retaining each subject’s observed history through the appropriate contribution.

A factorization such as \(f_\theta(y_i\mid x_i)g_\psi(r_i\mid y_i,x_i)\) is a modeling statement about the joint distribution. It is not permission to omit \(g_\psi\) when constructing the likelihood. If the response model does not depend on outcomes, it may be possible for response factors to separate from outcome factors under additional conditions; that simplification should be derived from the specified model, not assumed. When the response probability depends on missing outcomes, the integral generally couples the outcome and response parameters.

The likelihood contribution is only as credible as its component models and assumptions. Misspecified outcome distributions, response probabilities, covariate effects, or dependence structures can produce misleading inferences. In continuous-outcome models, challenging integrals may also require numerical methods; accurate computation does not repair a misspecified model. The earlier material on likelihood inference and instability addresses optimization and numerical accuracy, while this tutorial’s concern is the correct subject-level observed-data quantity to optimize.

Key takeaway: For each subject, multiply the full-outcome model by the probability of that subject’s response history, then sum or integrate over precisely the missing outcomes. Only after obtaining this observed-data contribution should it enter the log-likelihood.

Check Your Understanding

Answer each question using the likelihood construction above. Solutions follow the questions.

  1. In a record with \(R_i=(1,0,1)\), which outcomes are held fixed and which are integrated out?
  2. Why is it generally incorrect to evaluate the response probability only at the observed outcomes when that probability depends on a missing outcome?
  3. For a binary missing outcome with two possible values, what operation replaces the integral in the observed-data contribution?
  4. Under what condition does the full sample likelihood factor as a product of subject-level contributions?

Solutions. (1) Hold \(Y_{i1}\) and \(Y_{i3}\) fixed at their observed values; sum or integrate over \(Y_{i2}\). (2) The missing outcome’s value is unknown, and it can change the probability of the recorded response history, so that probability must be included inside the averaging over possible values. (3) Sum the joint outcome-response quantity over the two possible values of the missing outcome. (4) The product form applies when subjects are independent conditional on the modeled covariates and parameters; otherwise the dependence must be represented in a joint likelihood.

Clinical Biostats