Tutorials › Bayesian Clinical Trials › Logistic Random-Intercept Models For Basket Trials

Hierarchical Models and Basket Trials · Tutorial 461 of 696

Logistic Random-Intercept Models For Basket Trials

Learn how a shared distribution of basket-specific log-odds represents partial pooling of binary response rates and how to interpret and check the resulting model.

Advanced 12 min read

What You'll Learn

  • Specify Bernoulli and grouped-binomial likelihoods with basket-specific logistic intercepts.
  • Interpret each intercept as subgroup log odds and transform it to a response probability.
  • Explain how a shared normal distribution produces partial pooling across baskets.
  • Derive the conditional posterior kernel and the equation for its mode.
  • Identify model assumptions, diagnostics, and limitations relative to beta-binomial borrowing.

Why Use a Logistic Random Intercept?

In a basket trial, patients in different disease or biomarker subgroups may receive the same treatment, while each subgroup has its own binary response rate. Complete pooling assumes that every basket has exactly the same response probability; no pooling estimates each rate separately. A logistic random-intercept model takes an intermediate position: each basket has its own response probability, but its log odds are modeled as a draw from a shared distribution. This allows information to be shared without requiring the basket-specific rates to be identical.

The model is useful when the endpoint is binary, such as response by a defined assessment time. Its random intercept represents variation in the baseline response level across baskets. It does not, by itself, describe how a treatment effect varies across baskets.

Definition: Let \(Y_{ij}=1\) indicate response for patient \(i\) in basket \(j\), and let \(Y_{ij}=0\) indicate no response. A logistic random-intercept model is $$ Y_{ij}\mid \theta_j \sim \operatorname{Bernoulli}(p_j), \qquad \operatorname{logit}(p_j)=\theta_j, \qquad \theta_j\mid \mu,\tau \sim N(\mu,\tau^2), $$ where \(p_j=P(Y_{ij}=1\mid\theta_j)\), \(\operatorname{logit}(p)=\log\{p/(1-p)\}\), and \(\tau>0\). The basket-specific intercept \(\theta_j\) is the log odds of response in basket \(j\); \(\mu\) and \(\tau\) describe the shared distribution of those log odds.

For a Bayesian analysis, the shared parameters also receive a prior distribution, written \(\pi(\mu,\tau)\). The model can be fit by updating the joint distribution of the basket intercepts and shared parameters with the observed outcomes. When explaining the structure or doing a conditional calculation, it is useful to hold \(\mu\) and \(\tau\) fixed; that conditional calculation is not the same as a full analysis that accounts for their posterior uncertainty.

From Log Odds to Basket Response Rates

The inverse-logit transformation converts a basket intercept to a response probability:

$$ p_j=\frac{\exp(\theta_j)}{1+\exp(\theta_j)}. $$

Thus, \(\theta_j=0\) corresponds to \(p_j=0.5\); a positive intercept corresponds to response probability above 0.5, and a negative intercept to probability below 0.5. Differences between intercepts have an odds-ratio interpretation: a one-unit increase in \(\theta_j\) multiplies the odds of response by \(\exp(1)\). The intercept itself is not a probability or a percentage-point difference.

Worked Example: Interpreting Two Basket Intercepts

Suppose two hypothetical baskets have intercepts \(\theta_1=-1\) and \(\theta_2=0.5\). Convert each intercept to a response probability and compare their odds.

For basket 1, \(p_1=\exp(-1)/\{1+\exp(-1)\}=1/(1+\exp(1))\approx 0.2689\). Its response odds are \(\exp(-1)\approx 0.3679\), or about 0.368 response events per nonresponse.

For basket 2, \(p_2=\exp(0.5)/\{1+\exp(0.5)\}\approx 0.6225\). Its response odds are \(\exp(0.5)\approx 1.649\).

The intercept difference is \(0.5-(-1)=1.5\), so the odds ratio is \(\exp(1.5)\approx 4.482\). Under this model, basket 2 has about 4.482 times the response odds of basket 1. This is a comparison of odds, not a claim that its response probability is 4.482 times as large.

The shared distribution is on the log-odds scale. In particular, \(\mu\) is the mean of the basket intercepts under the normal distribution, not generally the logit of the average response probability across baskets. Even when \(\mu\) is known, the average probability across baskets is \(E[\operatorname{logit}^{-1}(\theta_j)\mid\mu,\tau]\), which need not equal \(\operatorname{logit}^{-1}(\mu)\).

Likelihood and Partial Pooling

Let \(n_j\) be the number of patients observed in basket \(j\), and let \(y_j=\sum_{i=1}^{n_j}Y_{ij}\) be its number of responses. Conditional on \(\theta_j\), the outcomes are independent Bernoulli observations with common probability \(p_j\). Consequently, the basket count has a binomial distribution. Across baskets, the likelihood conditional on the intercepts is:

$$ L(\boldsymbol{\theta};\boldsymbol{y}) =\prod_{j=1}^{J}{n_j\choose y_j} p_j^{y_j}(1-p_j)^{n_j-y_j}, \qquad p_j=\operatorname{logit}^{-1}(\theta_j). $$

The normal distribution for the intercepts supplies the hierarchical part of the model. Conditional on \(\mu\) and \(\tau\), the joint posterior kernel for the intercepts is the likelihood multiplied by their normal densities. If \(\mu\) and \(\tau\) are uncertain, their prior and the same likelihood are included in the joint posterior as well.

Partial pooling follows because a basket's estimate is informed by both its outcomes and the shared distribution. A basket with limited data will generally be more influenced by that distribution than a basket with extensive data. The amount of borrowing is not a fixed percentage: it depends on the observed data and on the shared parameters, including the between-basket spread \(\tau\).

Worked Example: Evaluating a Basket Likelihood

In a hypothetical basket, 5 of 10 patients respond. Evaluate the likelihood of these data at \(\theta=0\), so that the model assigns response probability \(p=0.5\).

The grouped-binomial likelihood is \(L={10\choose 5}p^5(1-p)^5\). Substituting \(p=0.5\) gives \(L=252(0.5)^5(0.5)^5=252(0.5)^{10}=252/1024=0.24609375\).

The corresponding log likelihood is \(\log(0.24609375)\approx -1.40204\). This is the likelihood of the observed count at the specified intercept, including the binomial coefficient. For inference on \(\theta\), the binomial coefficient does not depend on \(\theta\), so it may be omitted from the likelihood kernel, but it is included here to make the probability of the count explicit.

A Conditional Posterior Calculation

The individual basket likelihood is not conjugate to a normal prior on its log odds. Therefore, unlike the beta-binomial model for a response probability, the conditional posterior for \(\theta_j\) does not have a normal closed form. It is still straightforward to write its density up to a proportionality constant, and computational methods can evaluate its summaries.

$$ \pi(\theta_j\mid y_j,\mu,\tau) \propto \left\{\operatorname{logit}^{-1}(\theta_j)\right\}^{y_j} \left\{1-\operatorname{logit}^{-1}(\theta_j)\right\}^{n_j-y_j} \exp\left\{-\frac{(\theta_j-\mu)^2}{2\tau^2}\right\}. $$

A useful justification of shrinkage is to examine the conditional posterior mode. Taking the log of this kernel and differentiating with respect to \(\theta_j\) gives the score:

$$ \frac{\partial}{\partial\theta_j}\log\pi(\theta_j\mid y_j,\mu,\tau) = y_j-n_jp_j-\frac{\theta_j-\mu}{\tau^2}. $$

At an interior mode, this derivative is zero. The first two terms compare the observed response count with its conditional expectation \(n_jp_j\); the final term pulls the intercept toward \(\mu\). The curvature is \(-n_jp_j(1-p_j)-1/\tau^2\), which is strictly negative for finite \(\theta_j\) and \(\tau>0\). Thus the conditional log posterior is strictly concave and has at most one mode.

Worked Example: A Sparse Basket and Its Conditional Mode

Consider a hypothetical basket with \(y=2\) responses among \(n=8\) patients. Condition on \(\mu=-0.5\) and \(\tau=0.8\). Find the equation for the conditional posterior mode and locate it approximately.

The mode solves \(2-8p-(\theta+0.5)/(0.8^2)=0\), where \(p=\operatorname{logit}^{-1}(\theta)\). The unregularized sample log odds are \(\log(2/6)\approx -1.099\), while the shared mean is \(-0.5\).

At \(\theta=-0.8035\), \(p=\operatorname{logit}^{-1}(-0.8035)\approx0.3093\), and the score is approximately \(2-8(0.3093)-(-0.8035+0.5)/0.64\approx 0.0000\). Thus the conditional posterior mode is approximately \(-0.8035\). It lies between the basket's unregularized log odds and the shared mean, illustrating shrinkage toward the shared distribution. This is a mode conditional on the specified \(\mu\) and \(\tau\), not the full posterior mean after uncertainty in those parameters is included.

Assumptions, Dependence, and Model Checks

The model's interpretation relies on substantive and sampling assumptions. The response definition, assessment window, and treatment context should be comparable across baskets. Conditional on a basket intercept, patient outcomes are assumed independent with a common response probability. Basket intercepts are modeled as exchangeable draws from a normal distribution on the log-odds scale, conditional on \(\mu\) and \(\tau\). This exchangeability is a modeling assumption, not a guarantee that baskets are clinically interchangeable.

The shared intercept also induces within-basket dependence after it is marginalized out. To see this, take two distinct patients in basket \(j\) and condition on \(\mu,\tau\). Their outcomes are independent given \(\theta_j\), so \(E(Y_{ij}Y_{kj}\mid\mu,\tau)=E(p_j^2\mid\mu,\tau)\), while each marginal mean is \(E(p_j\mid\mu,\tau)\). Therefore,

$$ \operatorname{Cov}(Y_{ij},Y_{kj}\mid\mu,\tau) =E(p_j^2\mid\mu,\tau)-\{E(p_j\mid\mu,\tau)\}^2 =\operatorname{Var}(p_j\mid\mu,\tau). $$

This dependence represents patients sharing a basket response probability. It does not automatically account for repeated outcomes on the same patient, additional clustering within a basket, patient-level predictors, or time trends; those require suitable model extensions and assumptions.

Model checking should examine both the computation and the fit. Compare observed basket counts with posterior predictive counts, particularly for unusually high or low response rates, and check whether the assumed normal distribution on the log-odds scale is plausible for the number and diversity of baskets. Inspect whether posterior conclusions are sensitive to reasonable choices for the prior on shared parameters. Sparse data can leave basket intercepts and heterogeneity weakly informed; all-response or zero-response counts can make separate empirical log odds infinite, even though a hierarchical model with proper priors can yield finite posterior summaries. Such a result should not be mistaken for strong data-driven evidence about that basket.

Comparison and Limitations

The beta-binomial hierarchy models basket probabilities directly and has a conjugate structure for binomial counts under a beta prior. The logistic-normal model instead places a normal distribution on log odds. Its scale can be convenient for interpreting odds and for incorporating predictors in extensions, but the logistic transformation means the marginal distribution of basket probabilities is not beta, and the conditional posterior is not conjugate. Both approaches can implement partial pooling; neither makes borrowing automatically appropriate when basket outcomes are in conflict.

The random-intercept model also assumes one response probability per basket over the modeled assessment period. It can be inadequate if patients within a basket differ systematically in important measured characteristics, if outcomes are repeated, or if the treatment effect itself varies across subgroups. It does not resolve the clinical question of whether the baskets are sufficiently comparable to share information; that judgment must accompany statistical diagnostics.

Common pitfall: Treating \(\mu\) as the common response probability, or reporting \(\theta_j\) as if it were a probability, confuses the log-odds distribution with the outcome scale. The basket probability is \(\operatorname{logit}^{-1}(\theta_j)\); \(\mu\) is the mean log odds in the shared distribution, and probabilities should be obtained by transforming basket intercepts or summarizing their transformed posterior draws.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(\theta_j=\log(3)\), what are the response odds and response probability in basket \(j\)?
  2. For \(y_j=0\) and \(n_j=6\), what part of the model provides information about \(\theta_j\) beyond that basket's likelihood?
  3. Why can two patients in the same basket be dependent marginally even though the model assumes conditional independence?
  4. What is the main modeling-scale difference between a beta-binomial hierarchy and a logistic-normal random-intercept model?

Solutions. (1) The odds are \(\exp\{\log(3)\}=3\). The probability is \(3/(1+3)=0.75\). (2) The normal distribution \(\theta_j\mid\mu,\tau\sim N(\mu,\tau^2)\) contributes information by connecting the basket to the shared distribution; the resulting degree of borrowing also depends on the data and on \(\mu,\tau\). (3) Both outcomes share the random probability \(p_j\). After integrating over \(\theta_j\), their covariance conditional on \(\mu,\tau\) is \(\operatorname{Var}(p_j\mid\mu,\tau)\), which is generally positive. (4) The beta-binomial places a beta distribution directly on response probabilities, whereas the logistic-normal model places a normal distribution on log odds and transforms those draws to probabilities.

Clinical Biostats