Why Model One Cell Type Against the Rest?
For each donor, a cell-type count has a natural denominator: the total number of cells included in the chosen composition. A focused question is whether the odds that a sampled cell belongs to one target type, rather than to all other included types combined, differ between conditions. Binomial regression expresses that comparison using donor-level counts and sample-level predictors.
The model is useful because it respects the count denominator and gives a direct condition effect on the log-odds scale. Its central limitation is equally important: the ordinary binomial model treats cells as conditionally independent draws with a common probability for a donor. Biological differences among donors, or dependence among cells from the same donor, can produce more variability than that assumption allows.
The One-Versus-Rest Logistic Model
Let \(x_i=0\) denote the reference condition and \(x_i=1\) the comparison condition. With no additional covariates, the logistic binomial regression is
The denominator is not a separate control group: \(N_i-Y_i\) combines every other cell type included in the selected composition. The model therefore concerns the odds of target type versus all remaining included cells. The choice of included cells must be fixed and scientifically meaningful; changing the denominator changes the estimand.
The basic assumptions are that each donor contributes an appropriate count and denominator, donors are independent sampling units, and—conditional on the modeled predictors—each cell has the same target-type probability within a donor and behaves as an independent Bernoulli observation. The logistic mean structure must also be adequate: the modeled predictors must describe how the log odds vary. If donors are paired, repeatedly measured, or otherwise dependent, an ordinary independent-donor fit does not account for that dependence.
Why the Coefficient Is a Log Odds Ratio
The interpretation follows directly from the model. At \(x_i=0\), the log odds are \(\beta_0\); at \(x_i=1\), they are \(\beta_0+\beta_1\). Subtracting the reference log odds from the comparison log odds leaves \(\beta_1\). Exponentiation converts that difference of log odds into a ratio of odds:
This is a conditional probability statement about a cell drawn from the selected denominator. Even when the target-type proportion rises, the model alone does not establish that the absolute number of target cells rose: the total number of captured cells and the counts of other types also matter.
Worked Example: Fitting a Two-Condition Model
Suppose a hypothetical study has four independent donors in each condition. Each donor contributes 100 cells to the chosen denominator. Each reference donor has 10 target-type cells and 90 remaining cells; each comparison donor has 20 target-type cells and 80 remaining cells. The model uses one grouped binomial count per donor, with condition as the predictor.
The reference-condition probability is \(40/400=0.10\), and the comparison-condition probability is \(80/400=0.20\). Thus the estimated odds ratio is
The fitted model estimates 2.25 times the odds of a cell being the target type rather than one of the remaining types in the comparison condition, relative to the reference condition. This is not a 2.25-fold increase in the target-type proportion: the proportions here are 0.20 and 0.10, a twofold ratio.
For this two-group fit, the model-based standard error of the log odds ratio is
Testing \(H_0:\beta_1=0\) against a two-sided alternative gives the Wald statistic \(z=0.8109/0.2083=3.892\), with a normal-approximation p-value of about \(9.9\times10^{-5}\). Under the model assumptions, this is evidence against equal target-versus-rest odds across conditions; it is not the probability that the null hypothesis is true.
A 95% Wald interval is \(0.8109\pm1.96(0.2083)=(0.4026,1.2193)\) for the log odds ratio. Exponentiating both endpoints gives an odds-ratio interval of approximately \((1.496,3.385)\). In repeated studies under the model, this interval procedure would cover the true odds ratio about 95% of the time; it does not mean that this particular interval has a 95% probability of containing a fixed parameter.
Adding Covariates and Reading Predictions
Additional donor-level predictors can be included when the scientific estimand calls for adjustment. For a continuous covariate \(z_i\), one possible model is \(\operatorname{logit}(p_i)=\beta_0+\beta_1x_i+\beta_2z_i\). In this model, the condition coefficient compares conditions at the same value of \(z_i\), assuming the condition effect does not vary with \(z_i\). If an interaction is included, the condition contrast depends on \(z_i\) and must be interpreted at specified covariate values.
Worked Example: An Adjusted Condition Coefficient
Consider hypothetical fitted coefficients \(\hat{\beta}_0=-2.00\), \(\hat{\beta}_1=0.70\), and \(\hat{\beta}_2=0.40\), where \(z\) is a standardized donor covariate. The fitted model is \(\operatorname{logit}(p_i)=-2.00+0.70x_i+0.40z_i\). At \(z=1\), the reference-condition linear predictor is \(-2.00+0.40=-1.60\), giving \(\hat p=1/(1+\exp(1.60))=0.1680\). For the comparison condition it is \(-2.00+0.70+0.40=-0.90\), giving \(\hat p=1/(1+\exp(0.90))=0.2891\).
At the same covariate value, the estimated odds ratio is \(\exp(0.70)=2.014\). The difference between the two predicted probabilities is not itself the coefficient: logistic regression is linear in log odds, and probability differences depend on the starting probability. These hypothetical coefficients illustrate interpretation; they do not establish that the covariate is adequately controlled or that the model fits well.
Overdispersion, Diagnostics, and Failure Modes
The ordinary binomial variance is \(N_ip_i(1-p_i)\). It follows from the model’s conditional independence and common-probability assumptions. If donors vary in their underlying target-type probabilities, or cells within a donor are correlated, observed donor counts can vary more than this variance predicts. This is overdispersion relative to the binomial model. Standard errors based on the ordinary binomial likelihood may then be too small, making Wald tests and confidence intervals misleadingly decisive.
Worked Example: A Simple Overdispersion Check
Suppose eight hypothetical donors each contribute 100 cells, and an intercept-only model estimates a target-type probability of 0.15. Their observed target counts are 5, 7, 9, 11, 19, 21, 23, and 25. They sum to 120, so the fitted probability is \(120/800=0.15\), as specified.
For each donor, the binomial variance under the fitted model is \(100(0.15)(0.85)=12.75\). The Pearson goodness-of-fit statistic is the sum of squared observed-minus-expected differences divided by this variance:
With eight donor counts and one fitted intercept, a rough reference has \(8-1=7\) degrees of freedom; \(33.88/7=4.84\) is a large dispersion ratio. This pattern warns that the ordinary binomial variance may be inadequate. It is a diagnostic signal, not proof of one particular biological mechanism or a substitute for checking data quality, predictors, and study design.
Useful checks include comparing donor-level observed proportions with fitted probabilities, looking for donors with unusually large residuals, and assessing whether residual variation exceeds that predicted by the binomial variance. Also check that denominators are correctly constructed, that the target type is consistently defined, and that the condition and covariate structure is correctly specified. A zero count is possible under a binomial model, but if a condition has no observed target cells, ordinary coefficient estimates can become unstable or diverge; sparse-data inference needs particular caution.
What This Model Does—and Does Not—Replace
A donor-level proportion analysis models \(Y_i/N_i\) directly and can make donor-to-donor variability more visible, but ordinary unweighted analysis may discard information about different denominators, while weighted analyses require their own variance assumptions. Binomial regression uses the count and denominator together and permits covariate adjustment, but its cell-level binomial variance can be too restrictive. A joint model for all cell types addresses a different question from a single target-versus-rest contrast; it is useful when the joint composition is the object of interest. The choice depends on the estimand, denominator, replication, and adequacy of the sampling assumptions.
In particular, more cells from a donor increase \(N_i\), but they do not create more independent biological donors. When the binomial assumption fails, simply increasing cell counts can make model-based standard errors appear increasingly precise without resolving donor heterogeneity. The model’s odds ratio remains a clearly defined contrast of target type against the chosen rest, but its uncertainty must be credible for the study’s sampling structure.
Specify the target type, the set of remaining included cells, and the reference condition.
For each independent donor, record \(Y_i\) and \(N_i\), ensuring \(0\leq Y_i\leq N_i\).
Fit the binomial logistic model, interpret the condition coefficient on the log-odds scale, and exponentiate it for the odds ratio.
Check donor-level residual patterns, dispersion, sparse counts, and whether the independence and mean-structure assumptions are plausible.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- If \(\hat{\beta}_1=-0.50\), what is the estimated condition odds ratio, and what does its direction indicate?
- Why can a condition coefficient for target type versus rest not be interpreted as a change in absolute target-cell abundance?
- In a donor with \(N_i=250\) included cells and \(Y_i=30\) target cells, what is the remaining-cell count?
- Name one pattern that would suggest the ordinary binomial variance is inadequate.
Solutions. (1) \(\exp(-0.50)=0.6065\); the comparison condition has lower estimated target-versus-rest odds than the reference condition. (2) The odds are defined among the cells in the selected denominator, and the total number of captured cells can also change. (3) \(250-30=220\) remaining cells. (4) For example, donor-level residual variation substantially exceeding the fitted binomial variance suggests overdispersion and warrants further investigation.