Why Separate Patient Predictors From Basket Variation?
Patients enrolled in different baskets can differ in prognostic characteristics, such as disease severity or a biomarker level. Those characteristics may predict response even if they do not explain why treatment effects differ between baskets. A model that does not distinguish these roles can attribute patient-composition differences to basket-level treatment variation, or can obscure treatment-effect variation by adjusting for the wrong quantity.
A useful starting point is a binary response \(Y_{ij}\) for patient \(i\) in basket \(j\), a treatment indicator \(T_{ij}\), and patient-level covariates \(x_{ij}\). The covariates describe individual patients. Basket-specific intercepts and treatment effects describe how response patterns may vary across the clinical subgroups. These are different sources of variation and should be represented separately.
A Hierarchical Logistic Regression
For a binary endpoint, let \(Y_{ij}=1\) denote response and \(Y_{ij}=0\) denote no response. A basic model is
Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). The intercept \(\alpha_j\) is the log odds of response for a comparison-group patient with covariates set to zero in basket \(j\). The vector \(\beta\) contains patient-level covariate coefficients. The coefficient \(\delta_j\) is the treatment effect in basket \(j\) on the log-odds scale. With this coding, \(T_{ij}=1\) denotes treatment and \(T_{ij}=0\) denotes comparison.
A simple hierarchy for the basket-specific effects is
The model can also use a fixed common intercept if basket-specific baseline variation is not part of the intended model. In the displayed version, \(\alpha_0\) and \(\sigma_\alpha\) govern baseline variation, while \(\delta\) and \(\tau\) govern treatment-effect variation. For clarity, this formulation treats the two sets of basket effects as conditionally independent. Other dependence structures are possible but require separate justification. Proper priors are assigned to regression coefficients and hyperparameters; for example, normal priors for regression coefficients and positive-support priors for the standard deviations.
The central distinction is that \(\beta\) is indexed by patient characteristics, not by basket, whereas \(\delta_j\) is indexed by basket. A positive \(\beta_k\) says that, conditional on treatment and the other modeled terms, a one-unit increase in covariate \(k\) is associated with higher response odds. A positive \(\delta_j\) says treatment has higher response odds than comparison in basket \(j\), conditional on the covariates. Neither coefficient is itself a probability difference.
This model assumes that the Bernoulli outcomes are conditionally independent given the modeled predictors and parameters, that the logit is an appropriate link, and that the covariate effects are common across baskets unless explicitly extended. It also assumes the chosen hierarchy is a reasonable description of how basket effects relate. In a randomized trial, treatment assignment supports a causal interpretation of treatment contrasts under consistency and appropriate handling of missing outcomes. In nonrandomized data, the model alone does not remove confounding.
Worked Example: Reading the Patient and Basket Terms
Worked Example: Reading the Patient and Basket Terms
Suppose a hypothetical trial has two baskets and one binary patient-level covariate \(x_{ij}\), coded 1 for high-risk and 0 for low-risk. Consider the fitted linear predictor \(\operatorname{logit}(p_{ij})=\alpha_j+0.5x_{ij}+\delta_jT_{ij}\). For basket 1, take \(\alpha_1=-1\) and \(\delta_1=0.6\). Calculate fitted probabilities for a high-risk patient in the comparison and treatment groups.
For the comparison patient, \(T=0\), \(x=1\), and the linear predictor is \[ -1+0.5(1)+0.6(0)=-0.5. \] Thus \[ p=\frac{\exp(-0.5)}{1+\exp(-0.5)}=0.3775407\approx 0.3775. \]
For the treated patient, \(T=1\), so the linear predictor is \[ -1+0.5(1)+0.6(1)=0.1, \] and \[ p=\frac{\exp(0.1)}{1+\exp(0.1)}=0.5249792\approx 0.5250. \] The fitted probability difference for this covariate pattern is \(0.5249792-0.3775407=0.1474385\), or approximately 0.1474 (14.74 percentage points).
The coefficient 0.5 is the high-risk versus low-risk covariate association on the log-odds scale; it is not a difference of 50 percentage points. The treatment coefficient 0.6 is a conditional log-odds contrast in basket 1. Its probability-scale impact depends on the baseline probability and covariate values.
How the Hierarchy Borrows Information
The treatment effect \(\delta_j\) is informed both by responses in basket \(j\) and by the distribution shared with the other baskets. This is partial pooling: a basket with little information tends to have an estimate closer to the common treatment-effect mean \(\delta\), while a basket with substantial information can be more data-driven. The amount of pooling depends on the heterogeneity scale \(\tau\), as well as the information in each basket.
A short derivation in a normal approximation makes the weighting explicit. Suppose an estimated basket treatment effect \(Z_j\) has sampling model \(Z_j\mid\delta_j\sim N(\delta_j,s_j^2)\), and conditionally \(\delta_j\sim N(\delta,\tau^2)\), where \(\delta\) and \(\tau\) are treated as fixed for this calculation. Multiplying the likelihood and prior kernels gives
Therefore the conditional posterior is normal with variance \((1/s_j^2+1/\tau^2)^{-1}\) and mean \((Z_j/s_j^2+\delta/\tau^2)/(1/s_j^2+1/\tau^2)\). The estimate is a precision-weighted compromise between the basket estimate and the hierarchy mean. This calculation is conditional on fixed hyperparameters; a full Bayesian analysis also averages over uncertainty in those hyperparameters.
Worked Example: Partial Pooling With a Normal Approximation
Suppose a hypothetical basket has an estimated log-odds treatment effect \(Z_j=0.80\) with standard error \(s_j=0.50\). For illustration, condition on a hierarchy mean \(\delta=0.40\) and heterogeneity standard deviation \(\tau=0.30\). The normal approximation above gives posterior mean
\[ \frac{0.80/0.50^2+0.40/0.30^2}{1/0.50^2+1/0.30^2} = \frac{3.200+4.444444\ldots}{4.000+11.111111\ldots} = 0.505882\ldots\approx 0.5059. \]
The posterior variance is \[ \frac{1}{1/0.50^2+1/0.30^2} =\frac{1}{15.111111\ldots} =0.0661765\ldots, \] so the posterior standard deviation is \(\sqrt{0.0661765\ldots}=0.2572\) to four significant figures. The basket estimate 0.80 is pulled toward 0.40 because the basket estimate is imprecise relative to the specified hierarchy.
Exponentiating the posterior mean log-odds effect gives a plug-in odds ratio of \(\exp(0.505882\ldots)=1.658\). This is the odds ratio corresponding to the posterior mean on the log-odds scale; it is not the posterior expectation of the odds ratio, which would require transforming and averaging the full posterior distribution. This illustration is a normal approximation, not a replacement for fitting the Bernoulli-logistic hierarchy to patient-level data.
Covariate Adjustment and Standardized Comparisons
A treatment coefficient is conditional on the covariate values in the model. For communication, a trial may instead require a response probability averaged over a specified patient population. To standardize, predict each patient’s response under each treatment assignment while holding that patient’s covariates fixed, then average those predictions using the same population weights for both assignments. This separates the modeled treatment contrast from differences in covariate composition.
For a posterior draw \(m\), let \(p_{ij}^{(m)}(t)\) be the predicted response probability for patient \(i\) in basket \(j\) if treatment is set to \(t\). With fixed weights \(w_{ij}\) summing to one, the standardized probability is \(\sum_{ij}w_{ij}p_{ij}^{(m)}(t)\). Repeating this calculation over posterior draws gives a posterior distribution for the standardized probability and for its treatment contrast. The weights define the target population; they should be stated rather than chosen implicitly from different treatment-arm compositions.
Worked Example: Standardizing Over Risk Groups
Consider a hypothetical basket with low-risk and high-risk patients equally weighted. A fitted model gives comparison response probabilities 0.1192029 and 0.2689414, respectively, and treatment probabilities 0.2314752 and 0.4501660. Calculate the equal-weight standardized probabilities and difference using the unrounded model probabilities.
The comparison probability is \[ (0.1192029+0.2689414)/2=0.1940722\approx 0.1941. \] The treatment probability is \[ (0.2314752+0.4501660)/2=0.3408206\approx 0.3408. \] Thus the standardized difference is \(0.3408206-0.1940722=0.1467484\), or 0.1467 (14.67 percentage points).
Now suppose the comparison group is 80% low-risk and 20% high-risk, while the treatment group is 20% low-risk and 80% high-risk. Their model averages are \[ 0.8(0.1192029)+0.2(0.2689414)=0.1491506\approx0.1492 \] and \[ 0.2(0.2314752)+0.8(0.4501660)=0.4064278\approx0.4064. \] The crude difference between these averages is \(0.4064278-0.1491506=0.2572772\), or 0.2573. It combines treatment contrast with differing covariate composition, unlike the equal-weight standardized comparison.
Model Choices, Diagnostics, and Limitations
Covariate adjustment does not have just one form. An unadjusted basket analysis estimates response without patient predictors. A pooled regression with a single treatment coefficient assumes a common treatment effect across baskets. Separate regressions allow basket effects to differ but do not borrow information. A hierarchical regression is intermediate: it permits variation and partially pools estimates. These approaches answer different modeling questions; no amount of adjustment makes an implausible pooling assumption appropriate.
The shared-\(\beta\) model assumes the covariate-response association is common across baskets. If evidence and clinical reasoning support different associations, basket-specific covariate effects could be considered, but sparse data may not estimate them reliably. A patient-level treatment interaction, such as \(\gamma^\mathsf{T}x_{ij}T_{ij}\), represents treatment-effect modification by patient characteristics. It is not the same as a basket-specific random treatment effect \(\delta_j\), which represents variation between baskets. Adding either term should be scientifically motivated and supported by adequate information.
Useful checks include verifying treatment and covariate coding, confirming that the model produces plausible fitted probabilities, examining whether covariate distributions overlap across treatment groups, and checking whether chains mix and converge. Very sparse baskets or baskets with all responses or no responses can produce weakly identified logistic effects; proper priors can regularize estimates but do not create information. Compare fitted and observed response patterns across treatment, basket, and important covariate groups. Sensitivity to the prior on \(\tau\) matters because it controls the degree of borrowing.
A common mistake is to treat a difference in observed basket response rates as evidence of different treatment effects, even when the baskets have different patient mixes. The correction is to distinguish baseline prognosis, patient-level covariate associations, and basket-specific treatment effects in the model, then make comparisons over a clearly defined common covariate distribution when that is the target. Conversely, adding a covariate does not automatically solve confounding, guarantee exchangeability, or justify extrapolation to covariate patterns absent from the data.
Check Your Understanding
Answer each question, then check the concise solutions below.
- In the model \(\operatorname{logit}(p_{ij})=\alpha_j+\beta x_{ij}+\delta_jT_{ij}\), which term describes a patient-level predictor and which allows treatment effects to vary by basket?
- If \(\delta_j=0.7\), what does \(\exp(\delta_j)\) represent, and what does it not represent?
- Why can a crude comparison of treatment-arm response proportions be misleading when covariate composition differs?
- What happens to the normal-approximation posterior mean in the limiting case \(\tau\to\infty\), with \(s_j\) fixed?
Solutions. (1) \(\beta\) is the shared patient-level covariate coefficient; \(\delta_j\) is the basket-specific treatment effect. (2) \(\exp(0.7)\approx2.014\) is the conditional treatment-versus-comparison odds ratio in basket \(j\), holding modeled covariates fixed; it is not a probability ratio or probability difference. (3) Different proportions of prognostic covariate patterns can change observed response proportions independently of treatment, so the crude contrast combines treatment and composition. (4) As \(\tau\to\infty\), prior precision \(1/\tau^2\to0\), and the posterior mean tends to \(Z_j\); the hierarchy contributes essentially no pooling for that basket.