Tutorials › Pattern-Mixture and Selection Models › Deriving the Two-Visit Joint Distribution

Diggle-Kenward and Related Models · Tutorial 84 of 499

Deriving the Two-Visit Joint Distribution

You will derive and evaluate the joint density of two longitudinal outcomes and a dropout indicator under a bivariate normal outcome model and logistic current-outcome selection.

Advanced 12 min read

What You'll Learn

  • Factor a two-visit joint distribution into an outcome density and a conditional dropout probability.
  • Write the bivariate normal density using its conditional-normal representation.
  • Incorporate a logistic dropout rule that depends on the latent second-visit outcome.
  • Calculate joint densities and verify that the dropout states sum to the outcome density.
  • Distinguish selection odds from joint-density ratios and identify key model limitations.

Why derive the joint distribution?

In a two-visit study, dropout before the second visit can depend on the outcome that would have been measured at that visit. That outcome is latent for a participant who drops out, but the selection model still describes the probability of dropout conditional on its value. Writing down the full joint distribution makes this assumption explicit: it combines a model for the outcomes with a model for the dropout decision.

We define the timing and indicators first. Let \(Y_1\) and \(Y_2\) be the continuous outcomes at visits 1 and 2. Let \(D=1\) mean that the participant drops out after visit 1 and before the visit-2 measurement; let \(D=0\) mean that the participant remains through visit 2. The selection decision is made before \(Y_2\) is observed, but \(Y_2\) is treated as a well-defined latent outcome for everyone. Thus, for \(D=1\), \(Y_2\) is unobserved, not absent from the joint model.

Definition: A two-visit joint selection model specifies an outcome density \(f(y_1,y_2)\) and conditional probabilities \(P(D=d\mid Y_1=y_1,Y_2=y_2)\). Their product defines the joint density \(f(y_1,y_2,D=d)=f(y_1,y_2)P(D=d\mid Y_1=y_1,Y_2=y_2)\). When dropout depends on the current outcome alone, the second factor depends on \(y_2\), not \(y_1\).

Specify the outcome and selection components

Assume the pair \((Y_1,Y_2)\) follows a bivariate normal distribution. Write its means as \(\mu_1,\mu_2\), marginal standard deviations as \(\sigma_1,\sigma_2>0\), and correlation as \(\rho\), with \(-1<\rho<1\). A useful representation is

$$ Y_1\sim N(\mu_1,\sigma_1^2),\qquad Y_2\mid Y_1=y_1\sim N\left(\mu_2+\rho\frac{\sigma_2}{\sigma_1}(y_1-\mu_1),\, \sigma_2^2(1-\rho^2)\right). $$

The second argument of each normal distribution is a variance. This representation determines the joint outcome density by the usual conditional-density factorization \(f(y_1,y_2)=f(y_1)f(y_2\mid y_1)\). For the dropout component, assume a logistic model depending on the current outcome:

$$ P(D=1\mid Y_1=y_1,Y_2=y_2) =\operatorname{expit}(\alpha+\beta y_2) =\frac{\exp(\alpha+\beta y_2)}{1+\exp(\alpha+\beta y_2)}. $$

Here \(\alpha\) is the intercept and \(\beta\) is the change in log dropout odds per one-unit increase in \(Y_2\). The probability of remaining through visit 2 is the complement, \(P(D=0\mid y_1,y_2)=1-P(D=1\mid y_1,y_2)\). Both probabilities are strictly between zero and one for finite \(\alpha,\beta,y_2\).

The assumptions are substantive. The outcome pair is bivariate normal; the latent \(Y_2\) exists under dropout; and, conditional on \(Y_2\), the dropout decision does not additionally depend on \(Y_1\) or other variables. This last restriction is the meaning of “current-outcome selection alone” in this model. A model with additional predictors would require them in the selection equation.

Deriving the joint density

The derivation uses two factorizations. First, the bivariate normal density is the product of the marginal density of \(Y_1\) and the conditional density of \(Y_2\) given \(Y_1\). Second, for either dropout state, the joint density is the outcome density multiplied by the conditional probability of that state. Combining them gives

$$ \begin{aligned} f(y_1,y_2,D=1) &=f(y_1)f(y_2\mid y_1) \frac{\exp(\alpha+\beta y_2)}{1+\exp(\alpha+\beta y_2)},\\ f(y_1,y_2,D=0) &=f(y_1)f(y_2\mid y_1) \frac{1}{1+\exp(\alpha+\beta y_2)}. \end{aligned} $$

Substituting the normal densities makes the full form explicit:

$$ \begin{aligned} f(y_1,y_2,D=1) &= \frac{1}{\sigma_1\sqrt{2\pi}} \exp\left\{-\frac{(y_1-\mu_1)^2}{2\sigma_1^2}\right\}\\ &\quad{}\times \frac{1}{\sigma_2\sqrt{1-\rho^2}\sqrt{2\pi}} \exp\left\{ -\frac{\left[y_2-\mu_2-\rho\frac{\sigma_2}{\sigma_1}(y_1-\mu_1)\right]^2} {2\sigma_2^2(1-\rho^2)} \right\} \frac{\exp(\alpha+\beta y_2)}{1+\exp(\alpha+\beta y_2)},\\ f(y_1,y_2,D=0) &= \frac{1}{\sigma_1\sqrt{2\pi}} \exp\left\{-\frac{(y_1-\mu_1)^2}{2\sigma_1^2}\right\}\\ &\quad{}\times \frac{1}{\sigma_2\sqrt{1-\rho^2}\sqrt{2\pi}} \exp\left\{ -\frac{\left[y_2-\mu_2-\rho\frac{\sigma_2}{\sigma_1}(y_1-\mu_1)\right]^2} {2\sigma_2^2(1-\rho^2)} \right\} \frac{1}{1+\exp(\alpha+\beta y_2)}. \end{aligned} $$

These are densities with respect to the two continuous outcomes, together with probabilities for the discrete indicator \(D\). Consequently, their units are the inverse product of the outcome units; \(D\) itself contributes no continuous unit.

Justification: At each fixed pair \((y_1,y_2)\), the two conditional probabilities add to one. Therefore \(f(y_1,y_2,D=1)+f(y_1,y_2,D=0)=f(y_1,y_2)\). Integrating this equality over both outcomes gives total probability one, since \(f(y_1,y_2)\) is a normalized bivariate normal density. This verifies that the joint model is normalized.

Worked calculations

Worked Example: Joint density at the outcome means

Consider hypothetical scores measured in points, with \(\mu_1=60\), \(\mu_2=64\), \(\sigma_1=12\), \(\sigma_2=10\), and \(\rho=0.6\). Let \(\alpha=-3.2\) and \(\beta=0.05\) per point. Find the joint densities at \(y_1=60,y_2=64\) for each dropout state.

The conditional mean of \(Y_2\) at \(Y_1=60\) is \(64+0.6(10/12)(60-60)=64\), and its conditional standard deviation is \(10\sqrt{1-0.6^2}=8\) points. Both outcomes are therefore at their respective conditional means. The outcome density is

$$ f(60,64)= \frac{1}{12\sqrt{2\pi}}\frac{1}{8\sqrt{2\pi}} =\frac{1}{192\pi} \approx 0.001658\ \text{per squared score point}. $$

The dropout linear predictor is \(-3.2+0.05(64)=0\), so \(P(D=1\mid 60,64)=\operatorname{expit}(0)=0.5\). Thus \(f(60,64,D=1)=0.00165786(0.5)\approx0.0008289\) per squared score point. The complementary state has \(f(60,64,D=0)\approx0.0008289\) per squared score point. Their sum recovers \(f(60,64)\), as required.

Worked Example: A noncentral outcome pair

Use the same hypothetical model, now evaluating \(y_1=72,y_2=72\). First, \(Y_1=72\) is one standard deviation above its mean, so \(f(72)=\exp(-1/2)/(12\sqrt{2\pi})\approx0.02016\) per point. Given \(Y_1=72\), the conditional mean of \(Y_2\) is \(64+0.5(72-60)=70\), with standard deviation 8. The value 72 is \(0.25\) conditional standard deviations above that mean, giving

$$ f(72\mid72)=\frac{\exp(-0.25^2/2)}{8\sqrt{2\pi}} \approx0.04833\ \text{per point}, \qquad f(72,72)\approx(0.02016)(0.04833)=0.0009746. $$

The selection predictor is \(-3.2+0.05(72)=0.4\), and the dropout probability is \(\operatorname{expit}(0.4)\approx0.5987\). Therefore \(f(72,72,D=1)\approx0.0009746(0.5987)=0.0005835\) per squared score point. The probability of remaining is \(1-0.5987=0.4013\), so \(f(72,72,D=0)\approx0.0009746(0.4013)=0.0003911\) per squared score point. The two values sum, up to rounding, to \(0.0009746\).

Worked Example: Selection odds versus joint-density ratios

For the same model and a fixed \(Y_1=60\), compare the selection probabilities at \(Y_2=60\) and \(Y_2=72\). The linear predictors are \(-3.2+0.05(60)=-0.2\) and \(-3.2+0.05(72)=0.4\). Hence the dropout probabilities are approximately \(0.4502\) and \(0.5987\), respectively. The corresponding dropout odds are \(\exp(-0.2)=0.8187\) and \(\exp(0.4)=1.492\); their ratio is

$$ \frac{\operatorname{odds}(D=1\mid Y_2=72)} {\operatorname{odds}(D=1\mid Y_2=60)} =\exp\{0.05(72-60)\} =\exp(0.6)\approx1.822. $$

This is a ratio of conditional dropout odds, not a ratio of joint densities. At \(Y_1=60\), the conditional outcome mean is 64 and the conditional standard deviation is 8. The outcome-density ratio for \(Y_2=72\) versus \(Y_2=60\) is \(\exp\{-[1^2-(-0.5)^2]/2\}=\exp(-0.375)\approx0.6873\). Thus, for \(D=1\), the joint-density ratio is \(0.6873(0.5987/0.4502)\approx0.914\), not \(1.822\). The outcome density and the selection probability both contribute to a joint-density comparison.

Checks, alternatives, and limitations

Several checks follow directly from the derivation. The conditional variance \(\sigma_2^2(1-\rho^2)\) must be positive, which is why the model requires \(\sigma_2>0\) and \(|\rho|<1\). The conditional mean should agree with the stated covariance: the slope of the conditional mean is \(\rho\sigma_2/\sigma_1\). For any fixed outcome pair, the two dropout-state densities must add to the outcome density. A failure of this last check usually signals an incorrect logistic complement or a missing factor.

Model diagnostics can assess whether the bivariate normal outcome component is plausible, including its marginal shapes, conditional mean structure, and residual spread. The selection equation can be checked for coding, scaling, and whether its specified predictors match the assumed decision process. But the key limitation is that \(Y_2\) is unavailable for dropouts: the association between that latent outcome and dropout cannot be directly diagnosed from those missing values. Conclusions relying on this association therefore depend on the selection-model assumptions and should be treated with appropriate sensitivity analysis.

The main alternative factorizations express different modeling choices. Under a missing-at-random selection model with no current-outcome dependence, \(\beta=0\), so the dropout probability is constant in \(Y_2\) in this simple setup. A pattern-mixture model instead specifies outcome distributions conditional on dropout pattern. These formulations are not interchangeable by merely changing notation: each places assumptions on different conditional distributions. The logistic specification here is also a modeling choice; other links change the form of the selection probability. No link or outcome distribution is guaranteed to fit every application.

A common mistake is to treat the dropout probability as a function of the observed \(Y_2\) only, and then conclude that the model cannot assign a dropout probability when \(Y_2\) is missing. The correction is to define the probability conditionally on the latent \(Y_2\) in the full-data model. For a dropout, the relevant observed-data calculation must account for the unobserved outcome rather than pretending it was observed; the joint density derived here is the starting point for that distinction.

Key takeaway: The two-visit joint density is the bivariate normal outcome density multiplied by a logistic probability for the relevant dropout state. The outcome distribution describes where \((Y_1,Y_2)\) lie; the selection factor allocates that density between \(D=1\) and \(D=0\).

Check Your Understanding

Answer each question using the model definitions above; brief solutions follow the questions.

  1. Why must the joint density include a value of \(Y_2\) when \(D=1\), even though that outcome is unobserved?
  2. For \(\alpha=-1\), \(\beta=0\), and any fixed outcome pair, what is the conditional dropout probability?
  3. If \(\rho=0\), what happens to the conditional mean and variance of \(Y_2\mid Y_1\)?
  4. Why is \(\exp\{\beta(y_{2b}-y_{2a})\}\) an odds ratio rather than a joint-density ratio?

Solutions. (1) The full-data selection model defines a latent outcome for each participant; dropout makes \(Y_2\) unobserved, not nonexistent. (2) The predictor is \(-1\), so the probability is \(\operatorname{expit}(-1)=1/(1+e)\approx0.2689\), independent of the outcomes. (3) The conditional mean is \(\mu_2\), and the conditional variance is \(\sigma_2^2\), so the outcome variables are independent under this bivariate normal model. (4) The expression is the ratio of logistic dropout odds at the two specified current-outcome values. A joint-density ratio also includes the ratio of the two outcome densities, which need not equal one.

Clinical Biostats