Tutorials › Multiple Imputation by Chained Equations (MICE) › Checking Global Compatibility in Three Variables

Fully Conditional Specification · Tutorial 125 of 497

Checking Global Compatibility in Three Variables

Learn how pairwise odds-ratio restrictions across all three variable pairs determine whether three binary full conditional models can come from one joint distribution.

Intermediate 11 min read

What You'll Learn

  • Express each binary full conditional as a logistic model with main effects and an interaction.
  • Derive the pairwise odds-ratio restrictions implied by a common joint distribution.
  • Check all three variable pairs and the interaction restrictions, not just one stratum.
  • Construct a joint distribution when the conditional models satisfy the compatibility conditions.
  • Distinguish an exact compatibility failure from small discrepancies caused by rounded estimates.
  • Identify positivity, model-form, and structural-zero limitations of the check.

Why Check All Three Conditionals Together?

In fully conditional specification, each variable is updated from a model conditional on the other variables. When there are three variables, it is not enough for one pair of conditionals to be compatible: the restrictions must agree around all three pairs. A mismatch in any pair rules out a single joint distribution that has all three specified conditionals.

We develop an exact check for three binary variables \(X\), \(Y\), and \(Z\). It compares the pairwise conditional odds ratios in both directions and across the strata defined by the third variable. The result is a finite set of coefficient equalities that is both necessary and sufficient under the assumptions below.

Definition: Three full conditional models are compatible if there is one joint probability distribution for \((X,Y,Z)\) whose conditional distributions, for each variable given the other two, are exactly the specified models. In this tutorial, compatibility is checked for binary variables with positive probability in all eight configurations.

Conditional Logistic Models and Pairwise Restrictions

Assume each variable takes values 0 and 1, all conditional probabilities are specified for every configuration of the other two variables, and all probabilities are strictly between 0 and 1. Write the three conditional models as saturated logistic regressions:

$$ \begin{aligned} \operatorname{logit}P(X=1\mid Y=y,Z=z) &=a_X+b_{XY}y+b_{XZ}z+c_Xyz,\\ \operatorname{logit}P(Y=1\mid X=x,Z=z) &=a_Y+b_{YX}x+b_{YZ}z+c_Yxz,\\ \operatorname{logit}P(Z=1\mid X=x,Y=y) &=a_Z+b_{ZX}x+b_{ZY}y+c_Zxy. \end{aligned} $$

Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). Each conditional includes both main effects and the interaction between its two predictors, so it can represent any strictly positive binary conditional table. The coefficient \(c_X\), for example, allows the association between \(X\) and \(Y\) to differ between \(Z=0\) and \(Z=1\).

For a fixed value \(z\), the conditional odds ratio relating \(X\) and \(Y\) can be calculated from the \(X\)-conditional. Changing \(Y\) from 0 to 1 changes the log odds of \(X=1\) by \(b_{XY}+c_Xz\), so the odds ratio is \(\exp(b_{XY}+c_Xz)\). The \(Y\)-conditional gives the same pairwise odds ratio as \(\exp(b_{YX}+c_Yz)\). If both models come from the same positive joint distribution, these odds ratios must agree at each value of \(z\). Equality at \(z=0\) gives \(b_{XY}=b_{YX}\); equality at \(z=1\) then gives \(c_X=c_Y\).

Applying this argument to the other two pairs yields the complete set of restrictions:

$$ b_{XY}=b_{YX},\qquad b_{XZ}=b_{ZX},\qquad b_{YZ}=b_{ZY},\qquad c_X=c_Y=c_Z. $$

Each pairwise coefficient must agree in the two conditionals for that pair. In addition, the three conditional interaction coefficients must agree. Checking only one stratum of a pair tests the relevant \(b\) equality but cannot establish equality of the interaction coefficients.

Why These Conditions Are Sufficient

Necessity follows from the odds-ratio argument. To show sufficiency, suppose the displayed equalities hold. Form a joint distribution with unnormalized probability

$$ w(x,y,z)= \exp\!\left( a_Xx+a_Yy+a_Zz+ b_{XY}xy+b_{XZ}xz+b_{YZ}yz+c_Xxyz \right). $$

Because every \(w(x,y,z)\) is positive, the normalizing constant \(K=\sum_{x,y,z\in\{0,1\}}w(x,y,z)\) is finite and positive. Thus \(P(X=x,Y=y,Z=z)=w(x,y,z)/K\) defines a positive joint distribution. To obtain the conditional odds of \(X\), take the ratio of its joint probabilities at \(x=1\) and \(x=0\), holding \(y,z\) fixed. The normalizing constant cancels:

$$ \log\frac{P(X=1\mid y,z)}{P(X=0\mid y,z)} =\log\frac{w(1,y,z)}{w(0,y,z)} =a_X+b_{XY}y+b_{XZ}z+c_Xyz. $$

The same calculation for \(Y\) and \(Z\) recovers their specified conditional logits, using the coefficient equalities. Therefore the constructed joint distribution has all three stated full conditionals. This proves that, under positivity and the stated saturated logistic forms, the restrictions are necessary and sufficient.

Worked Example: A Compatible Collection and Its Joint Distribution

Suppose the conditional models have zero intercepts, pairwise coefficients \(b_{XY}=\log 2\), \(b_{XZ}=\log 3\), \(b_{YZ}=\log 4\), and interaction coefficients \(c_X=c_Y=c_Z=\log 5\). In the reverse conditionals, set \(b_{YX}=\log 2\), \(b_{ZX}=\log 3\), and \(b_{ZY}=\log 4\). Every pairwise coefficient matches its reverse, and all three interaction coefficients match, so the compatibility conditions hold.

The unnormalized joint weights are \(w(x,y,z)=2^{xy}3^{xz}4^{yz}5^{xyz}\). For example, \(w(1,1,0)=2\), \(w(1,0,1)=3\), \(w(0,1,1)=4\), and \(w(1,1,1)=2\cdot3\cdot4\cdot5=120\). The eight weights, in the order \(000,100,010,001,110,101,011,111\), are \(1,1,1,1,2,3,4,120\). Their sum is \(K=133\).

Thus \(P(X=1,Y=1,Z=1)=120/133\approx0.9023\). As a conditional check, when \(Y=1,Z=0\), the odds of \(X=1\) versus \(X=0\) are \(w(1,1,0)/w(0,1,0)=2/1=2\), giving \(P(X=1\mid Y=1,Z=0)=2/(1+2)=2/3\). The \(Y\)-conditional gives the same odds ratio for \(X\) and \(Y\) when \(Z=0\), as required.

Checking the Restrictions in Practice

A systematic check has three pairwise comparisons and an interaction comparison. For each pair, compare the corresponding coefficients in the two conditionals; then verify that all three interaction coefficients agree. Equivalently, compare conditional odds ratios within each stratum of the third variable. The coefficient method is convenient when the logistic models are fitted directly; the stratum method makes the meaning of the restrictions explicit.

1
Confirm the setting.
Check that the variables are binary, the full conditionals are specified over all configurations, and positivity is plausible for every configuration.
2
Compare each pair.
Check \(b_{XY}\) against \(b_{YX}\), \(b_{XZ}\) against \(b_{ZX}\), and \(b_{YZ}\) against \(b_{ZY}\).
3
Check changes across strata.
Compare \(c_X,c_Y,c_Z\). A difference means the pairwise odds-ratio changes implied by the conditionals cannot all agree.
4
Interpret the result carefully.
For exact specified models, any failed equality rules out a common joint distribution. With estimated or rounded coefficients, assess the size and uncertainty of discrepancies rather than treating tiny numerical differences as definitive.

Worked Example: A Pairwise Odds-Ratio Mismatch

Consider the pair \(X,Y\) at \(Z=0\). Suppose the \(X\)-conditional gives \(P(X=1\mid Y=1,Z=0)=0.6682\) and \(P(X=1\mid Y=0,Z=0)=0.5744\). Its implied odds ratio is

$$ \frac{0.6682/(1-0.6682)}{0.5744/(1-0.5744)} = \frac{0.6682/0.3318}{0.5744/0.4256} \approx 1.492. $$

Now suppose the reverse conditional gives \(P(Y=1\mid X=1,Z=0)=0.60=3/5\) and \(P(Y=1\mid X=0,Z=0)=5/11\). Its implied odds ratio is

$$ \frac{(3/5)/(2/5)}{(5/11)/(6/11)} = \frac{3/2}{5/6} =1.800. $$

Both sets of probabilities are strictly between 0 and 1, but the pairwise odds ratios differ: \(1.492\) versus \(1.800\). A positive common joint distribution would require these odds ratios to be equal at \(Z=0\). Therefore these two conditionals are incompatible, and adding a third conditional cannot make the full collection compatible.

Worked Example: A Match in One Stratum Is Not Enough

Suppose the two conditionals for \(X,Y\) have \(b_{XY}=b_{YX}=\log 2\), so both imply an odds ratio of 2 when \(Z=0\). But let \(c_X=\log 3\) and \(c_Y=\log 4\). When \(Z=1\), the \(X\)-conditional implies an odds ratio of \(\exp(\log 2+\log 3)=6\); the \(Y\)-conditional implies \(\exp(\log 2+\log 4)=8\).

The models agree for \(Z=0\) but disagree for \(Z=1\). In coefficient terms, \(c_X\ne c_Y\); in odds-ratio terms, the association changes by different amounts across the two conditionals. This pair alone rules out a common positive joint distribution. It illustrates why checking only the unstratified or reference-stratum odds ratio is insufficient.

Diagnostics, Alternatives, and Limitations

For specified conditional models, the restrictions are exact algebraic checks. For fitted models, coefficients are estimates and may differ because of sampling variability, model fitting, or rounding. Inspect the matched coefficients and their uncertainty, and compare implied odds ratios in both strata. A small difference in rounded output is not, by itself, evidence of incompatibility; conversely, a substantial discrepancy should not be dismissed because the chain appears numerically stable.

A direct alternative is to specify a joint model first and derive all three conditionals from it. The joint log-linear form used in the sufficiency argument makes the shared pairwise and three-way terms explicit. This enforces compatibility by construction, whereas separately specified full conditional models require checking. The conditional approach can be more convenient in FCS, but the compatibility check does not decide whether either modeling strategy is substantively appropriate.

The result relies on positivity. If some configurations have probability zero by design or because of structural constraints, certain conditional probabilities and odds ratios may be undefined, and these equalities do not apply without modification. It also relies on the stated saturated logistic representation for binary full conditionals. For variables with other distributions, or models with different predictors or constraints, the corresponding compatibility conditions must be derived for those models rather than borrowed from this binary case.

Common pitfall: “The \(X,Y\) odds ratios agree when \(Z=0\), so the three conditionals are compatible.” This checks only \(b_{XY}=b_{YX}\). Compatibility also requires agreement in the other two pairs and equality of all three interaction coefficients, which checks the changes in pairwise associations across strata.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For a positive binary joint distribution, why must the \(X,Y\) odds ratio calculated from the \(X\)-conditional equal the one calculated from the \(Y\)-conditional when \(Z\) is fixed?
  2. Suppose \(b_{XZ}=0.4\) and \(b_{ZX}=0.4\), but \(c_X=0.2\) and \(c_Z=0.5\). Do these coefficients satisfy the compatibility restrictions for the \(X,Z\) pair?
  3. If \(b_{XY}=b_{YX}\) and \(c_X=c_Y\), what does this establish about the \(X,Y\) pair? What remains to be checked for global compatibility?
  4. Give one reason the coefficient equality check may need modification in a data set with structural zeros.

Solutions. (1) For fixed \(Z=z\), the odds ratio is the same joint cross-product ratio \(P(1,1,z)P(0,0,z)/\{P(1,0,z)P(0,1,z)\}\), regardless of which conditional is used to calculate it. (2) No. The pairwise main-effect coefficients match, but the interaction coefficients do not; the implied \(X,Z\) odds ratios would change differently across \(Y\). (3) The \(X,Y\) pairwise odds ratios agree at both values of \(Z\). Global compatibility still requires the corresponding equalities for the \(X,Z\) and \(Y,Z\) pairs and a common value of all three interaction coefficients. (4) A conditional probability or odds ratio may be undefined for a configuration with zero probability, so the positive-support derivation and its coefficient equalities cannot be applied unchanged.

Clinical Biostats