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.
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
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.
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
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:
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:
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
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
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
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.
Check Your Understanding
Answer each question using the likelihood construction above. Solutions follow the questions.
- In a record with \(R_i=(1,0,1)\), which outcomes are held fixed and which are integrated out?
- Why is it generally incorrect to evaluate the response probability only at the observed outcomes when that probability depends on a missing outcome?
- For a binary missing outcome with two possible values, what operation replaces the integral in the observed-data contribution?
- 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.