From Conditional Statements to a Joint Model
A model description often arrives as a collection of conditional relationships: how outcomes evolve across visits, how response depends on outcomes or latent effects, and how baseline covariates relate to those effects. A joint factorization turns those statements into one probability law. The central task is not to choose a familiar product mechanically, but to preserve exactly the conditional relationships that were specified.
Let \(X\) denote baseline covariates, \(U\) a latent effect, \(Y=(Y_1,\ldots,Y_T)\) the vector of longitudinal outcomes, and \(R\) the response pattern. The vector \(Y\) refers to all outcomes in the model, including values that may not be observed for a particular pattern. A factorization may use probability mass functions for discrete variables and densities for continuous variables; sums below are replaced by integrals when appropriate.
The chain rule permits different factorizations of the same joint law, provided each factor is the correct conditional distribution under that law. However, a proposed model does not automatically permit every possible factorization. In particular, replacing a conditional distribution such as \(p(r\mid y,x,u)\) with \(p(r\mid x,u)\) imposes the additional condition \(R\perp Y\mid X,U\). That replacement is justified only when this conditional independence is specified or follows from the model.
A Practical Construction and Verification
Begin by listing every variable in the joint law. Then record the model statements as conditional distributions, preserving their conditioning sets. Choose an order that makes those distributions usable as factors. If the outcome model is sequential, for example, a natural factorization is \(p(y_1\mid x,u)\prod_{t=2}^T p(y_t\mid y_1,\ldots,y_{t-1},x,u)\). A response factor can then be placed after the complete outcome vector if its stated conditioning set includes \(Y\).
A useful check is to sum or integrate the proposed joint distribution over variables that are not of interest. The resulting marginal should agree with the conditional relationships that remain in the model. For a normalized joint distribution, summing over all variables must give one. This check also exposes omitted factors: if a required conditional distribution is absent, the product may fail to normalize or may imply a different marginal law.
Include baseline covariates, latent effects, all longitudinal outcomes, and the response pattern. Do not remove an outcome from the model merely because it is unobserved for some patterns.
Write down the conditional distribution and its full conditioning set. Mark any stated conditional independence separately.
Use the chain rule or the stated conditional independences to assemble factors. Do not simplify conditioning sets without justification.
Sum or integrate variables in a convenient order. Check that each conditional factor sums or integrates to one over its own variable.
Worked Example: A Response Model Depending on the Outcome
Suppose a hypothetical one-visit study has a binary outcome \(Y\) and a binary response indicator \(R\), where \(R=1\) means the outcome is observed. The specified relationships are \(P(Y=1)=0.60\), \(P(R=1\mid Y=1)=0.80\), and \(P(R=1\mid Y=0)=0.25\). Construct the joint factorization and calculate the response probability.
The statements directly specify \(p(y)\) and \(p(r\mid y)\), so the compatible factorization is \(p(y,r)=p(y)p(r\mid y)\). The missing response probabilities are \(P(R=0\mid Y=1)=0.20\) and \(P(R=0\mid Y=0)=0.75\). The four joint probabilities are therefore
Summing over the outcome gives \(P(R=1)=0.48+0.10=0.58\). Summing over response gives \(P(Y=1)=0.48+0.12=0.60\), as specified. All four cells sum to \(0.48+0.12+0.10+0.30=1.00\), so the factorization is normalized.
The response probability changes with \(Y\) in this model. Writing \(p(y)p(r)\), or replacing \(p(r\mid y)\) by a response probability that does not depend on \(Y\), would not preserve the stated relationship.
Sequential Outcomes and a Shared Latent Effect
For repeated outcomes, the outcome portion of the factorization should reflect the specified temporal structure. A first-order Markov statement, for example, says that each outcome depends on the immediately preceding outcome and the listed covariates and latent effect, rather than on the entire earlier history. Without that statement, a full-history conditional distribution is the safe chain-rule form. A random effect is included as a variable in the joint law; it is not silently treated as observed or integrated out before constructing the complete joint factorization.
Worked Example: Two Visits with a Latent Effect and Dropout
Consider a hypothetical model with no baseline covariates, binary \(U,Y_1,Y_2\), and \(R=1\) denoting dropout after visit 1. The assumptions are \(P(U=1)=0.40\); \(P(Y_1=1\mid U=1)=0.70\) and \(P(Y_1=1\mid U=0)=0.20\); and \(Y_2\) has a normalized conditional distribution \(p(y_2\mid y_1,u)\). Finally, response depends on \(Y_1\) and \(U\), but not further on \(Y_2\) given those variables. The specified factorization is
For illustration, set \(P(R=1\mid Y_1=1,U=1)=0.30\), \(P(R=1\mid Y_1=0,U=1)=0.10\), \(P(R=1\mid Y_1=1,U=0)=0.60\), and \(P(R=1\mid Y_1=0,U=0)=0.20\). First marginalize \(Y_2\) and \(R\) conditional on \(Y_1,U\). For every \(y_1,u\),
Thus summing the full joint law over \(y_2,r\) leaves \(p(u)p(y_1\mid u)\); summing further over \(y_1,u\) gives one. The model's dropout probability can also be checked numerically. Given \(U=1\), it is \(0.70(0.30)+0.30(0.10)=0.24\). Given \(U=0\), it is \(0.20(0.60)+0.80(0.20)=0.28\). Hence
The value \(0.264\) is the marginal probability of dropout under this hypothetical model. It follows by averaging over both the latent-effect distribution and the first-visit outcome distribution; it is not obtained by using a single response probability independently of \(Y_1\) and \(U\).
Choosing Between Conditional Forms
A selection-style factorization places the response pattern after the complete outcomes, as in \(p(x)p(u\mid x)p(y\mid x,u)p(r\mid y,x,u)\). A pattern-mixture-style factorization can instead place the response pattern before outcomes, as in \(p(x)p(u\mid x)p(r\mid x,u)p(y\mid r,x,u)\). The chain rule makes each valid for a joint law when its factors are the actual conditionals under that law. But if the model description explicitly specifies one set of conditionals, choosing the other form requires deriving its factors from that joint law; it is not generally valid to copy the same conditional distributions into a new ordering.
Worked Example: A Pattern-Specific Outcome Model
In a hypothetical one-visit setting, suppose \(P(R=1)=0.40\), \(P(Y=1\mid R=1)=0.75\), and \(P(Y=1\mid R=0)=0.30\). These statements specify a pattern-mixture factorization \(p(r,y)=p(r)p(y\mid r)\). The four cells are
The cells sum to \(0.30+0.10+0.18+0.42=1.00\). Marginalizing over \(R\) gives \(P(Y=1)=0.30+0.18=0.48\), while marginalizing over \(Y\) gives \(P(R=1)=0.30+0.10=0.40\). The stated conditionals are therefore compatible with a normalized joint law.
The same joint law can be written in selection order, but the response conditional must be calculated from the cells. In particular, \(P(R=1\mid Y=1)=0.30/0.48=0.625\), not \(0.40\). The marginal response probability cannot be substituted for a conditional response probability.
Diagnostics, Limitations, and a Common Pitfall
A good algebraic check is to marginalize in more than one order. If the factors are normalized conditionals in a valid chain-rule ordering, summing a terminal variable should remove its conditional factor and leave the remaining product. Check specific implied marginals against the model statements, and verify the total mass is one. For continuous variables, the corresponding check uses integration. These checks can reveal an omitted factor, a response probability that does not sum to one over patterns, or a conditional distribution attached to the wrong variables.
There is an important limitation: normalization does not prove that the model expresses the intended scientific assumptions. Two distinct normalized factorizations can encode different conditional relationships. Marginalization checks algebraic compatibility with the stated conditionals; it does not establish that those conditionals are substantively appropriate.
- Wrong reasoning: “The response factor can be written as \(p(r\mid x,u)\) because it is simpler.” Correction: That factor asserts \(R\perp Y\mid X,U\). Use it only if the model states or implies that conditional independence.
- Wrong reasoning: “The response probability is the same whether it is conditional or marginal.” Correction: \(p(r)\) and \(p(r\mid y)\) are different quantities in general; derive one from the joint law when changing factorization.
- Wrong reasoning: “A missing outcome can be deleted from the joint law.” Correction: The complete outcome vector remains part of the model. A response pattern describes which components are observed; it does not remove the unobserved components from the joint distribution.
Check Your Understanding
Answer each question using the stated conditional relationships. Short solutions are included after the questions.
- If \(p(x)p(u\mid x)p(y\mid x,u)p(r\mid y,x,u)\) is the model, what conditional independence would be imposed by replacing the final factor with \(p(r\mid x,u)\)?
- Suppose \(p(r)\) and \(p(y\mid r)\) are specified. Which factorization follows directly, and what must be done before writing a selection-order factorization?
- In a sequential outcome model, what does a factor \(p(y_3\mid y_2,x,u)\) assert about earlier outcomes, compared with \(p(y_3\mid y_1,y_2,x,u)\)?
- For the two-visit example, why does marginalizing \(Y_2\) leave the dropout calculation unchanged?
- What two checks can establish that a proposed discrete joint factorization is algebraically consistent with its specified conditionals?
Solutions. (1) It imposes \(R\perp Y\mid X,U\), so it is not justified if response still depends on \(Y\) given \(X,U\). (2) The direct factorization is \(p(r)p(y\mid r)\). To use selection order, derive \(p(r\mid y)\) from the resulting joint law; it is not generally equal to \(p(r)\). (3) The first form asserts that \(Y_3\) is conditionally independent of \(Y_1\) given \(Y_2,X,U\); the second retains \(Y_1\) in its conditioning set and makes no such reduction. (4) Since \(\sum_{y_2}p(y_2\mid y_1,u)=1\), summing \(Y_2\) removes only its normalized conditional factor. (5) Sum over all variables to check total probability equals one, and marginalize selected variables to check that the resulting distributions agree with the specified relationships.