Conditional logistic model for longitudinal binary data Created 2026-10-07 Updated 2026-10-14
A logistic regression can specify each binary response conditionally on recorded past outcomes and baseline covariates. A chain rule for probabilities gives the path likelihood as the product of the conditional Bernoulli distribution masses. This permits dependence within a person's history without treating their outcomes as unconditionally independent. The model must specify the initial history and which past features enter its conditional mean.
Conditional mean of a bounded success time Created 2026-10-20 Updated 2026-10-25
Let be the probability of first success on attempt , conditional on reaching that attempt. Then the chain rule for probabilities gives ; no assumption of independent attempts is needed when these are the specified conditional probabilities. The chance of success by attempt is . Divide the truncated first moment by that probability to obtain the displayed conditional expectation, provided its denominator is positive. This is different from counting all unsuccessful cases as though they succeeded on the last permitted attempt.
For the three-coordinate state realization of an ARMA(1,1) process, the observation row and transition matrix are
The first row of is by the previous-time recursion; the second row is zero until the new white noise value is added; and the third row copies . Hence the state equation has noise covariance
We use the causal state model, in which the new driving noise is independent of the previous state. The Gaussian filtering with exact observations form of the Kalman filter alternates prediction through the state equation with conditioning on the next observation. Given the posterior expected value and covariance at time , independence of the new white noise value gives predictive expected value and predictive covariance
Project through the observation row to get
The residual is the innovation. Conditioning the joint Gaussian state-observation vector adjusts the expected value according to this residual and reduces the covariance. In this exact-observation model, the updates can be written
Thus and : the observed linear combination of the state is now known exactly, though other state combinations remain uncertain.
The PDF's stated prediction variance omits . This omission cannot be used in a valid likelihood: for the AR(1) specialization below it would give zero prediction variance after the first observation. The required likelihood calculation uses the corrected innovation variance just derived.
For stationary initialization of an ARMA(1,1) state with , take and the unconditional stationary covariance. The causal coefficients are at lag zero and at lags , giving
Since , the cross-covariance with is zero and that with is . Therefore
Direct substitution verifies . If prior state information is available, instead use its conditional expected value and covariance. A diffuse initialization is another option when the initial state is genuinely unknown, but it changes the finite-sample likelihood and should not silently replace the stationary initial law.
By the Gaussian prediction step,
The chain rule for probabilities for the joint probability density function therefore gives
Taking minus twice its logarithm shows that maximum likelihood estimation is equivalent to minimizing
with each and evaluated at the candidate parameters and the specified initialization. The corrected is essential in every .
For the stationary causal AR(1) case, and . The first observation is , whereas each later conditional observation is . Hence
This also gives a direct counterexample to the uncorrected PDF variance: with , and after observing , so its printed expression would give for .
To compare the conditional and stationary AR1 likelihood estimators, put
Then its negative twice log-likelihood is
For fixed , . Writing
the exact interior score equation is
The stationary initial contribution is order one for a fixed interior parameter, while is order . Discarding this lower-order contribution gives
Conditioning on makes this ratio the exact unconstrained conditional maximum likelihood estimate. Under the stationary initial law it is only the leading approximation: at an interior optimum,
This approximation presumes a nondegenerate sample denominator and a true coefficient fixed away from the unit-root boundary; a finite-sample constrained optimum must respect .
Treat as the entire phase-known genotype of individual at the genetic loci being studied, and let denote the nonfounders. Assume unrelated pedigree founders have independent genotype priors, each nonfounder's genotype depends only on its parents' genotypes, and the observed phenotypes are conditionally independent given the genotypes. These are the standard assumptions behind the pedigree likelihood; shared environmental effects or related pedigree founders would require additional factors.
The directed ancestry graph is acyclic, even when there is inbreeding. Order individuals with parents preceding offspring and apply the chain rule for probabilities. The parental conditional independence assumption gives
Conditional phenotype independence gives . Multiplying these two expressions and summing over every possible latent genotype configuration proves
This is the law of total probability, not a claim that relatives have independent unconditional genotypes.
The statement is true. Put . The assumed ensures that every conditioning event , , has positive probability. By the definition of conditional probability,
Multiplying makes the fractions telescope, giving
This proves the chain rule for probabilities here without any assumption of independence. The final numerator may be zero; all denominators remain positive.
Let indicate a smoking-free week, the recorded sex indicator, age in years and assigned treatment. The screening history supplies ; earlier lag initializations are also zero. A history-dependent logistic regression for the first model is
Here , is the observed past, and the five unknown regression coefficients have time-invariant values. Conditional on baseline covariates, this model has the first-order Markov property: only the immediately preceding outcome enters the current conditional probability. Distinct subjects have independent histories. There is no subject random effect or additional time trend in this fit.
Using the chain rule for probabilities, the individual conditional likelihood is
The lagged values in are the individual's actual preceding outcomes. This product is a sequential conditional likelihood, not an assertion of unconditional independence of the ten readings. The full conditional likelihood is ; no extra Bernoulli distribution factor is attached to the fixed screening history.
Take the event to mean three smoking-free weeks in succession, . The initial cumulative count is zero. Along this path it equals in weeks one, two, three, respectively. In the cumulative-response logistic model, define
The chain rule for probabilities then gives
The three conditional probabilities are approximately . If “stop during the first three weeks” instead means at least one smoking-free week by week three, its different event has probability : along the all-failure path the cumulative count stays zero. Stating the event resolves this wording ambiguity.
Use the intended model of uniform draws and a replacement decision independent of the first ball's colour, with probability . The marginal specification alone would not determine the experiment if replacement depended on that colour. This independence assumption is used throughout the question.
Write for a non-blue draw and for no replacement. The sample space consists of the eight ordered outcomes obtained by choosing one of , then one of , then one of . The chain rule for probabilities gives their probabilities:
For example, the first entry is . The fifth is because one blue ball has been removed. With no replacement after a non-blue first draw, the two remaining colours each have two balls, explaining the last two entries. The first four entries sum to and the last four to , so the full sample space has total probability one. At or , the corresponding impossible outcomes simply have zero probability.