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.
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:
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:
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
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:
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.
Check that the variables are binary, the full conditionals are specified over all configurations, and positivity is plausible for every configuration.
Check \(b_{XY}\) against \(b_{YX}\), \(b_{XZ}\) against \(b_{ZX}\), and \(b_{YZ}\) against \(b_{ZY}\).
Compare \(c_X,c_Y,c_Z\). A difference means the pairwise odds-ratio changes implied by the conditionals cannot all agree.
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
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
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.
Check Your Understanding
Answer each question, then compare with the solutions below.
- 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?
- 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?
- 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?
- 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.