Why integration is needed
In a longitudinal selection model, the probability of remaining observed can depend on an outcome that is not recorded. In particular, if dropout at visit \(t\) depends on the current outcome \(Y_t\), then a subject who drops before that visit has an unobserved \(Y_t\) that still appears in the selection probability. The observed-data likelihood must average over its possible values rather than substitute a single value or discard the selection factor.
This tutorial derives that averaging step. It focuses on the likelihood contribution for one monotone dropout pattern, with a baseline outcome observed for everyone. The central distinction is between the outcome at the dropout visit, which can affect the probability of dropout and must generally be integrated jointly with that event, and outcomes at later visits, which integrate out when the model contains no later selection factors for a subject who has already dropped out.
Model and assumptions
Write the outcome distribution sequentially as \(f(y_{1:T})=f_1(y_1)\prod_{t=2}^T f_t(y_t\mid y_{1:t-1})\). The selection model represents the conditional dropout process by the sequential hazards \(h_t\). For a subject with complete outcome trajectory \(y_{1:T}\) and dropout at visit \(d+1\), its selection probability is the product of survival through visits \(2,\ldots,d\) and dropout at visit \(d+1\).
The formula uses an empty product equal to 1 when \(d=1\). For a completer, \(D=T\), the corresponding selection probability is \(\prod_{t=2}^T[1-h_t(y_{1:t})]\). These expressions assume monotone dropout, a properly specified joint outcome density, valid probabilities \(0\le h_t\le1\), and the stated sequential selection factorization. There are no intermittent missing outcomes or additional observation mechanisms in this setup.
The observed-data contribution is the joint density or probability of the observed outcomes and the dropout pattern. It is not just the outcome density for the observed visits: it includes the probability of the observed dropout pattern, averaged over outcomes that are unobserved. For continuous outcomes the averaging is integration; for discrete outcomes it is summation.
Deriving the observed-data contribution
Suppose \(D=d<T\), so \(y_1,\ldots,y_d\) are observed. Start with the full outcome density multiplied by the dropout-pattern probability, then integrate over every unobserved outcome. This gives
The dropout hazard depends on outcomes only through visit \(d+1\), under the model defined here. Therefore, substitute the sequential factorization of \(f\) and integrate the outcomes after \(Y_{d+1}\) first. Each later conditional outcome density integrates to 1. The result is
For discrete \(Y_{d+1}\), replace the integral by a sum over its possible values. The remaining integral is a conditional expectation of the dropout hazard given the observed history. It is generally not equal to the hazard evaluated at the conditional mean outcome. This is the key integration step: even though \(Y_{d+1}\) was not observed, its distribution conditional on the observed history and its association with dropout both contribute to the observed-data likelihood.
For a completer, no outcomes are missing, so there is no integration:
This derivation also explains why outcomes strictly after the dropout visit disappear from the expression. Once dropout has occurred, this subject contributes no later response or dropout events. Under the sequential outcome model, the conditional distributions of those later outcomes integrate to 1. That conclusion would need to be reconsidered if the observation process included additional selection factors after dropout.
Worked Example: A Two-Visit Binary Outcome
Consider a hypothetical two-visit study. Everyone has \(Y_1=0\), and the outcome model gives \(P(Y_2=1\mid Y_1=0)=0.75\) and \(P(Y_2=0\mid Y_1=0)=0.25\). The dropout hazard before visit 2 is \(h_2(0,0)=0.10\) when \(Y_2=0\), and \(h_2(0,1)=0.50\) when \(Y_2=1\). A subject is observed at visit 1 and drops before visit 2.
Because \(Y_2\) is unobserved, the likelihood contribution for this pattern is the sum of the outcome probability times the matching dropout probability:
Substituting the hypothetical values gives \(L_1=0.25(0.10)+0.75(0.50)=0.025+0.375=0.400\). Thus, conditional on this subject’s \(Y_1=0\), the model assigns probability \(0.400\) to dropping before visit 2. The calculation uses both possible latent values of \(Y_2\); using only the more common value would not give this likelihood contribution.
Worked Example: Dropout at Visit 3 With an Observed Visit 2
Suppose a hypothetical three-visit study has \(P(Y_1=1)=0.50\), \(P(Y_2=1\mid Y_1=1)=0.60\), and a visit-2 retention probability \(1-h_2(1,1)=0.90\). For a subject with observed history \(Y_1=1,Y_2=1\), assume \(P(Y_3=1\mid Y_1=1,Y_2=1)=0.80\). The dropout hazard before visit 3 is 0.70 if \(Y_3=1\) and 0.10 if \(Y_3=0\). The subject drops before visit 3.
The contribution includes the observed outcome density, the probability of remaining observed at visit 2, and the dropout hazard averaged over the unobserved \(Y_3\):
The conditional hazard average is \(0.20(0.10)+0.80(0.70)=0.02+0.56=0.58\). Therefore, \(L_2(1,1)=0.50(0.60)(0.90)(0.58)=0.1566\). This is the joint probability of the observed history and dropout before visit 3 under the hypothetical model. It is not the conditional dropout probability alone, because the contribution also contains the probabilities of the observed outcomes and of remaining observed at visit 2.
Worked Example: Integrating Outcomes After Dropout
In another hypothetical three-visit study, everyone has observed \(Y_1=0\). Let \(P(Y_2=1\mid Y_1=0)=0.25\), and let the dropout hazard before visit 2 be 0.50 for \(Y_2=1\) and 0.10 for \(Y_2=0\). Although \(Y_3\) is also unobserved for a subject who drops before visit 2, suppose \(P(Y_3=1\mid Y_2=0)=0.20\) and \(P(Y_3=1\mid Y_2=1)=0.80\).
The contribution sums over both \(Y_2\) and \(Y_3\). For \(Y_2=0\), the conditional probabilities of \(Y_3=0\) and \(Y_3=1\) are 0.80 and 0.20, so their sum is 1; the branch contributes \(0.75(0.10)[0.80+0.20]=0.075\). For \(Y_2=1\), the probabilities of \(Y_3=0\) and \(Y_3=1\) are 0.20 and 0.80; that branch contributes \(0.25(0.50)[0.20+0.80]=0.125\). Hence \(L_1(0)=0.075+0.125=0.200\).
The conditional distribution of \(Y_3\) matters to the explicit sum, but it vanishes after summation because there is no selection factor involving \(Y_3\) after this subject has dropped out. By contrast, \(Y_2\) remains consequential because it enters the dropout hazard before visit 2.
Practical calculation and checks
For a pattern with last observed visit \(d\), the calculation can be organized as follows.
Record the observed outcomes \(y_{1:d}\) and identify the first missed visit, \(d+1\).
Include retention factors at each observed visit after baseline, followed by the dropout hazard at \(d+1\).
Use the joint outcome model for the observed and unobserved outcomes; do not omit the distribution of the latent current outcome.
Average the dropout hazard over \(Y_{d+1}\) conditional on the observed history. Integrate later outcomes as well; their conditional densities reduce to 1 when no further selection factors apply.
It must be nonnegative, and summing or integrating all possible observed patterns under the model must recover total probability 1.
The final check is a useful diagnostic for algebra or implementation errors. For a discrete model, enumerate possible full outcome histories and dropout patterns and verify that their probabilities sum to 1. For continuous outcomes, the corresponding condition is that the observed-data contributions integrate and sum to 1 over all possible observed values and dropout times. Also check that every selection probability is between 0 and 1 and that each retained subject has the appropriate retention factors.
A frequent mistake is to evaluate the dropout hazard at a predicted outcome, such as \(E(Y_{d+1}\mid y_{1:d})\), or at the most likely outcome, and use that as if it were the integrated hazard. In general, \(E\{h_{d+1}(Y_{1:d+1})\mid y_{1:d}\}\ne h_{d+1}(y_{1:d},E[Y_{d+1}\mid y_{1:d}])\). The equality is not a general property of nonlinear functions. The correction is to integrate the product of the conditional outcome distribution and the hazard, using a sum for discrete outcomes or an integral for continuous outcomes.
How this differs from simpler alternatives
| Approach | Contribution for dropout before visit \(d+1\) | What it assumes or omits |
|---|---|---|
| Outcome-dependent selection model | Integrates \(f_{d+1}(y_{d+1}\mid y_{1:d})h_{d+1}(y_{1:d+1})\) | Allows dropout to depend on the latent current outcome; requires integration under the specified outcome and selection models. |
| Selection independent of the current outcome | Uses a hazard that is constant in \(y_{d+1}\) given the observed history | The hazard can be taken outside the integral only under that restriction; it is a different selection assumption. |
| Plug-in outcome | Evaluates the hazard at one chosen value of \(y_{d+1}\) | Does not generally produce the observed-data likelihood contribution. |
The integrated expression is a consequence of the selection model, not an automatic correction for missing data. Its value depends on the outcome distribution used to average over the latent outcome and on the specified dropout hazard. These pieces may not be identified from observed data alone; conclusions that rely on the unobserved part of the model therefore require careful sensitivity analysis and transparent assumptions. For continuous outcomes, the integral may have no closed form and may require numerical quadrature or simulation, with numerical accuracy checked separately from model adequacy.
A useful conceptual check is to set the dropout hazard independent of \(Y_{d+1}\) given the observed history. Then the hazard is constant inside the integral, and because the conditional outcome density integrates to 1, the integral reduces to that hazard. This special case shows exactly why no averaging adjustment is needed when the current outcome has no role in selection. It does not justify making the same simplification when the hazard varies with the latent outcome.
Check Your Understanding
Try each question, then check the solution immediately below it.
- A subject drops before visit 2, and \(Y_2\) is binary with conditional probabilities 0.60 for 1 and 0.40 for 0. The dropout hazards are 0.30 for \(Y_2=1\) and 0.05 for \(Y_2=0\). What is the conditional dropout probability given the observed history?
- For dropout before visit 3, why does \(Y_3\) generally remain in the observed-data contribution while \(Y_4\) may integrate out?
- When may the hazard be taken outside the integral over \(Y_{d+1}\)?
- Why is evaluating the hazard at the conditional mean of \(Y_{d+1}\) generally not the correct integration?
Solutions. (1) The integrated probability is \(0.60(0.30)+0.40(0.05)=0.18+0.02=0.20\). (2) \(Y_3\) is the current outcome in the dropout decision before visit 3, so its value enters the hazard; after dropout, no later selection factor involves \(Y_4\), whose conditional density then integrates to 1. (3) The hazard may be taken outside when it does not depend on \(Y_{d+1}\) given the observed history; the remaining conditional density integrates to 1. (4) A nonlinear hazard function generally does not commute with expectation, so the average of the hazard over possible outcomes need not equal the hazard at the average outcome.