Why Condition Within Matched Sets?
In a matched case-control study, each case is paired or grouped with controls selected to be similar on specified factors. The comparison of interest is then made within each matched set, not by comparing all cases with all controls as if they came from unrelated groups. A logistic model can represent this design while allowing each set to have its own baseline odds. Conditioning on the fact that there is one case in each set removes those set-specific baselines and leaves a likelihood involving only within-set covariate differences.
The resulting likelihood is often called the conditional logistic likelihood. Its basic form is a ratio: the exponential covariate score of the observed case divided by the sum of the exponential scores of all members of that set. The ratio makes clear why only covariate comparisons within a set can inform the regression coefficients.
Model and Conditional Likelihood
Let there be \(I\) matched sets. Set \(i\) contains \(m_i\) people, indexed by \(j=1,\ldots,m_i\). Let \(Y_{ij}=1\) if person \(j\) in set \(i\) is the case and \(Y_{ij}=0\) otherwise, and let \(x_{ij}\) be a fixed \(p\)-dimensional covariate vector. Assume the outcomes are conditionally independent given the covariates and set membership, with the logistic model
Here \(\alpha_i\) is an unrestricted intercept for set \(i\), shared by all members of that set, and \(\beta\) is a common coefficient vector. Assume finite intercepts and coefficients, so each modeled probability is strictly between zero and one. The matched design has one case in each set: \(S_i=\sum_{j=1}^{m_i}Y_{ij}=1\). We condition on this event for every set.
To derive the formula, write \(p_{ij}=P(Y_{ij}=1\mid x_{ij},i)\). For the outcome pattern in which member \(j\) is the sole case, conditional independence gives
The logistic model says \(p_{ij}/(1-p_{ij})=\exp(\alpha_i+\beta^\mathsf{T}x_{ij})\). The event \(S_i=1\) consists of the \(m_i\) mutually exclusive patterns in which one particular member is the case. Summing the preceding expression over those patterns gives the probability of \(S_i=1\). Dividing the probability for pattern \(j\) by that sum cancels the common product and the factor \(\exp(\alpha_i)\), yielding
Because the sets are independent under the model and we condition separately on each set’s case count, the conditional likelihood is the product of the set-specific probabilities. If \(c_i\) denotes the observed case’s index in set \(i\), then
Worked Examples: Reading the Likelihood
Worked Example: Case Probabilities in One Matched Set
A matched set has three people with a single binary exposure represented by \(x=0,1,2\). Suppose the exposure coefficient is \(\beta=\log 2\). Find the conditional probability that each person is the case, given that the set contains exactly one case.
The three weights in the conditional likelihood are \(\exp(\beta x)\). They are \(1\) for \(x=0\), \(2\) for \(x=1\), and \(4\) for \(x=2\), since \(\exp\{(\log 2)x\}=2^x\). Their sum is \(1+2+4=7\). Thus the conditional probabilities, in order of exposure, are \(1/7\), \(2/7\), and \(4/7\). They sum to one, as required.
The set intercept does not enter any of these probabilities. Increasing exposure by one unit multiplies the weight by two, so the conditional odds that the person with \(x=1\) rather than the person with \(x=0\) is the case are \(2/1=2\); the same factor applies to \(x=2\) versus \(x=1\).
Worked Example: Estimating an Odds Ratio From Discordant Pairs
Suppose a matched study has pairs and a binary exposure. Among pairs where the case and control differ in exposure, seven have an exposed case and an unexposed control, while two have an unexposed case and an exposed control. Find the conditional maximum likelihood estimate of the exposure odds ratio.
For a discordant pair, let \(d=1\) if the case is exposed and the control is unexposed, and \(d=-1\) for the reverse. The conditional probability that the exposed member is the case is \(p=\exp(\beta)/(1+\exp(\beta))\). The likelihood contribution for the first orientation is \(p\); for the reverse orientation it is \(1-p\). Ignoring factors that do not depend on \(\beta\), the likelihood for these nine discordant pairs is
The log-likelihood as a function of \(p\) is \(7\log p+2\log(1-p)\). Its derivative is \(7/p-2/(1-p)\). Setting this equal to zero gives \(7(1-p)=2p\), hence \(\hat p=7/9\). The second derivative, \(-7/p^2-2/(1-p)^2\), is negative for \(0<p<1\), so this is the unique maximum. Converting back to the odds ratio gives
Thus the estimated conditional odds ratio is 3.5. Pairs concordant in exposure do not distinguish which member is the case by exposure and contribute no information about this coefficient; the calculation is driven by the within-pair exposure contrasts.
Odds Ratios Are Within-Set Comparisons
The conditional model also gives a direct interpretation of coefficients for more general covariates. For two members \(a\) and \(b\) of the same set, divide their conditional case probabilities. The denominator, which is common to both members, cancels:
This is also the conditional odds that \(a\), rather than \(b\), is the case, given that exactly one of the two is the case and all other set outcomes are zero. To see this, condition further on the event that the case is either \(a\) or \(b\); the probabilities of those two alternatives are proportional to their exponential weights, so their ratio is the expression above. For a one-unit increase in a scalar covariate with coefficient \(\beta\), holding other covariates fixed, the corresponding conditional odds ratio is \(\exp(\beta)\). For a vector contrast, it is \(\exp\{\beta^\mathsf{T}(x_{ia}-x_{ib})\}\).
Worked Example: Fitting a Continuous Covariate Effect
Consider three matched pairs with a continuous covariate \(x\). The case-minus-control differences are \(1\), \(2\), and \(-1\). Find the conditional maximum likelihood estimate of \(\beta\) and the estimated odds ratio for a one-unit increase in \(x\).
For a pair with difference \(d\), the conditional probability that the observed case is the case rather than the control is \(\exp(\beta d)/(1+\exp(\beta d))\). Write \(\pi(t)=\exp(t)/(1+\exp(t))\). The log-likelihood is
Since the derivative of \(\log\pi(t)\) with respect to \(t\) is \(1-\pi(t)\), the score is
At \(\beta=0.75\), \(\pi(0.75)\approx0.6792\) and \(\pi(1.50)\approx0.8176\), giving \(U(0.75)\approx0.0065>0\). At \(\beta=0.76\), \(\pi(0.76)\approx0.6814\) and \(\pi(1.52)\approx0.8205\), giving \(U(0.76)\approx-0.0038<0\). The root is approximately \(\hat\beta=0.756\), so the estimated odds ratio per one-unit increase is \(\exp(0.756)\approx2.13\).
The solution is a maximum: the second derivative is \(-\pi(\beta)\{1-\pi(\beta)\}-4\pi(2\beta)\{1-\pi(2\beta)\}-\pi(-\beta)\{1-\pi(-\beta)\}\), which is strictly negative for finite \(\beta\). The score therefore decreases strictly, and its sign change brackets the unique maximum.
Score and Curvature of the Conditional Likelihood
For computation and interpretation, the conditional likelihood has a useful general score form. Define
The weights are the model’s conditional probabilities for which member is the case, and \(\bar{x}_i(\beta)\) is their weighted covariate mean.
To derive the score, differentiate the log-likelihood contribution from set \(i\). The derivative of its first term is \(x_{i c_i}\). Differentiating the log of the denominator gives \(\sum_j \exp(\beta^\mathsf{T}x_{ij})x_{ij}/\sum_k\exp(\beta^\mathsf{T}x_{ik})=\bar{x}_i(\beta)\). Subtracting these terms and summing over sets gives \(U(\beta)\).
For the Hessian, differentiating the weighted mean gives \[ \nabla\bar{x}_i(\beta) =\sum_j w_{ij}(\beta)x_{ij}x_{ij}^\mathsf{T} -\bar{x}_i(\beta)\bar{x}_i(\beta)^\mathsf{T}. \] Expanding \((x_{ij}-\bar{x}_i)(x_{ij}-\bar{x}_i)^\mathsf{T}\) and using \(\sum_jw_{ij}=1\) shows that this is exactly the weighted covariance matrix \(\sum_jw_{ij}(x_{ij}-\bar{x}_i)(x_{ij}-\bar{x}_i)^\mathsf{T}\). Since the score subtracts \(\bar{x}_i\), its derivative is the negative of that matrix. Each weighted covariance matrix is positive semidefinite: for any vector \(v\), its quadratic form is \(\sum_j w_{ij}\{v^\mathsf{T}(x_{ij}-\bar{x}_i)\}^2\ge0\). The Hessian is therefore negative semidefinite, proving concavity. \(\square\)
Interpretation and Common Pitfalls
The conditional likelihood is useful because it eliminates one nuisance intercept per set without estimating those intercepts. Its information comes from how covariates vary within sets: a person’s covariate value is informative only in comparison with the values of the other members of that set. Consequently, a covariate that has no within-set variation cannot contribute a coefficient estimate through this likelihood.
- Pitfall: treating the analysis as an ordinary pooled logistic regression. Including one common intercept and ignoring matching does not represent separate baseline odds for the matched sets. The conditional likelihood instead compares members within each set while eliminating its own intercept.
- Pitfall: interpreting the conditional odds ratio as a comparison of unrelated people. The ratio \(\exp\{\beta^\mathsf{T}(x_{ia}-x_{ib})\}\) compares members of the same set under the model. It does not say that matching makes their covariates identical or that between-set differences identify the effect.
- Pitfall: expecting a coefficient for a set-constant variable. If \(x_{ij}=z_i\) for all members \(j\) in set \(i\), the common factor \(\exp(\beta^\mathsf{T}z_i)\) appears in every term of that set’s numerator and denominator and cancels. Such a coefficient is not identified by the conditional likelihood.
The conditioning step is specific to the one-case-per-set design and the stated logistic model. It removes the intercepts because they enter every member’s odds in a set through the same multiplicative factor. It does not remove the need to specify covariates and a defensible common within-set effect model.
Check Your Understanding
Answer each question by referring to the conditional likelihood and within-set comparisons.
- For a set with weights \(1\), \(3\), and \(6\), what are the conditional probabilities that each member is the case?
- Why does conditioning on exactly one case in a set remove its intercept \(\alpha_i\)?
- For two members with covariate vectors \(x_a\) and \(x_b\), write the conditional odds that \(a\), rather than \(b\), is the case.
- In a paired binary-exposure study, what feature of the pairs contributes information about the exposure coefficient, and why?
- What happens to a covariate that is constant within each matched set in the conditional likelihood?