Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › Bernoulli Logistic Models With Concentration Predictors

Binary, Ordinal and Count Response Models · Tutorial 314 of 598

Bernoulli Logistic Models With Concentration Predictors

Learn to build and check a Bernoulli logistic model that relates the probability of a binary pharmacodynamic event to concentration and treatment covariates.

Advanced 10 min read

What You'll Learn

  • Define a binary pharmacodynamic endpoint and its Bernoulli probability.
  • Write the logit link and its inverse, and verify that predictions lie between zero and one.
  • Center and scale concentration and code treatment groups to construct a clear linear predictor.
  • Include a concentration-by-treatment interaction when the model allows concentration slopes to differ.
  • Form the Bernoulli likelihood and identify the conditional independence assumption behind it.
  • Recognize common specification problems, including inappropriate outcomes, ambiguous reference groups, and unmodeled dependence.

From a Binary Endpoint to a Probability Model

A pharmacodynamic endpoint is sometimes recorded as a two-category outcome: for example, whether a prespecified response occurred by a defined assessment time. The central modeling task is to relate the probability of that event to exposure and treatment while ensuring that every predicted probability is between zero and one. A Bernoulli logistic model does this by linking the event probability to a linear predictor through the logit function.

Define the outcome for observation \(i\) as \(Y_i=1\) if the event occurred and \(Y_i=0\) otherwise. Here an observation must correspond to a clearly defined unit and endpoint assessment, such as one participant at one scheduled visit. Let \(p_i=P(Y_i=1\mid \mathbf{x}_i)\), where \(\mathbf{x}_i\) is the vector of predictors for that observation.

Definition: A Bernoulli logistic model specifies \(Y_i\mid\mathbf{x}_i\sim\operatorname{Bernoulli}(p_i)\) and \[ \operatorname{logit}(p_i)=\log\!\left(\frac{p_i}{1-p_i}\right)=\eta_i, \] where \(\eta_i\) is a linear predictor formed from model coefficients and covariates. Equivalently, \(p_i=\exp(\eta_i)/[1+\exp(\eta_i)]\).

The inverse-link formula follows by solving the definition of the logit: \(\exp(\eta_i)=p_i/(1-p_i)\), so \(p_i=\exp(\eta_i)[1-p_i]\), and therefore \(p_i=\exp(\eta_i)/[1+\exp(\eta_i)]\). For any finite \(\eta_i\), this gives \(0<p_i<1\). Thus the model can use a linear expression for \(\eta_i\) without allowing its probability predictions to fall below zero or exceed one.

For conditionally independent observations, the response model implies the Bernoulli likelihood \[ L(\boldsymbol{\beta})=\prod_{i=1}^{n}p_i^{y_i}(1-p_i)^{1-y_i}, \] where the probabilities depend on the coefficient vector \(\boldsymbol{\beta}\) through \(\eta_i\). Each observed event contributes \(p_i\); each non-event contributes \(1-p_i\). This is the likelihood specified by the model, not a statement that the observations must have the same event probability.

Constructing the Linear Predictor

A useful starting point is to make the units and reference values explicit. Let \(C_i\) be concentration in mg/L, \(C_{\mathrm{ref}}\) a chosen reference concentration in mg/L, and \(C_{\mathrm{scale}}>0\) a chosen concentration increment in mg/L. Define \(x_i=(C_i-C_{\mathrm{ref}})/C_{\mathrm{scale}}\). The scaled predictor \(x_i\) is dimensionless; increasing it by one corresponds to increasing concentration by \(C_{\mathrm{scale}}\). Centering and scaling do not change the underlying linear relationship when the intercept and slope are re-expressed, but they can make coefficients and calculations easier to communicate.

For a two-arm treatment variable, define \(T_i=0\) for the reference treatment and \(T_i=1\) for the other treatment. A model with a common concentration slope is

$$ \eta_i=\beta_0+\beta_C x_i+\beta_T T_i. $$

Here \(\beta_0\) is the linear predictor for the reference treatment at \(C_{\mathrm{ref}}\); \(\beta_C\) is the change in the linear predictor for a \(C_{\mathrm{scale}}\)-unit increase in concentration; and \(\beta_T\) is the difference in linear predictor between treatment groups at a fixed concentration. The model assumes that this treatment difference does not vary with concentration. These coefficient descriptions concern the logit scale; they do not by themselves describe a constant difference in event probabilities.

For a treatment factor with more than two levels, choose a reference level and add an indicator for each non-reference level. For example, with three levels, reference, A, and B, the treatment part is \(\beta_A I(T_i=A)+\beta_B I(T_i=B)\). Using all three group indicators together with an intercept would be redundant because exactly one indicator equals one for each observation.

If the concentration slope is allowed to differ by treatment, include a product term:

$$ \eta_i=\beta_0+\beta_C x_i+\beta_T T_i+\beta_{CT}x_iT_i. $$

For \(T_i=0\), the concentration slope on the logit scale is \(\beta_C\). For \(T_i=1\), it is \(\beta_C+\beta_{CT}\). The interaction coefficient is therefore a difference between these two slopes, not a separate treatment-group intercept. The concentration origin remains important: with \(x_i=0\) at \(C_{\mathrm{ref}}\), \(\beta_T\) compares treatments at that reference concentration.

Worked Example: Predicting an Event Probability

Suppose a hypothetical model uses \(x_i=(C_i-2.0\ \mathrm{mg/L})/(1.0\ \mathrm{mg/L})\), with placebo coded \(T_i=0\) and active treatment coded \(T_i=1\). The fitted coefficients are \(\beta_0=-1.20\), \(\beta_C=0.80\), and \(\beta_T=0.50\). Find the predicted event probability for an active-treatment observation at \(C_i=3.5\ \mathrm{mg/L}\).

First calculate the scaled concentration: \(x_i=(3.5-2.0)/1.0=1.50\). With \(T_i=1\), the linear predictor is

$$ \eta_i=-1.20+(0.80)(1.50)+(0.50)(1)=0.5000. $$

Transform this value using the inverse logit:

$$ p_i=\frac{1}{1+\exp(-0.5000)} =\frac{1}{1+0.6065} \approx 0.6225. $$

The model predicts an event probability of approximately \(0.6225\), or \(62.25\%\), for an observation with these covariates. This is a model-based prediction, not a claim that this individual’s outcome is known in advance.

Likelihood and a Coded-Treatment Example

The response coding and the predictor coding must describe the same event and treatment groups. If \(Y_i=1\) denotes lack of response rather than response, the model predicts the probability of lack of response. Reversing the event coding changes the meaning of the coefficients and predicted probabilities. It is not a harmless relabeling if the endpoint interpretation is left unchanged.

Worked Example: Writing the Model for Three Treatment Groups

In a hypothetical study, placebo is the reference group and two active regimens are labeled A and B. Let \(x_i=(C_i-1.0\ \mathrm{mg/L})/(0.5\ \mathrm{mg/L})\), \(A_i=I(T_i=A)\), and \(B_i=I(T_i=B)\). A common-slope model is \(\eta_i=\beta_0+\beta_Cx_i+\beta_AA_i+\beta_BB_i\). Suppose the coefficients are \(\beta_0=-0.70\), \(\beta_C=0.40\), \(\beta_A=0.30\), and \(\beta_B=-0.20\). Find the prediction for regimen B at \(C_i=2.0\ \mathrm{mg/L}\).

The scaled concentration is \(x_i=(2.0-1.0)/0.5=2.00\). For regimen B, \(A_i=0\) and \(B_i=1\). Thus

$$ \eta_i=-0.70+(0.40)(2.00)+(0.30)(0)+(-0.20)(1)=-0.1000. $$

The event probability is

$$ p_i=\frac{1}{1+\exp(0.1000)} =\frac{1}{1+1.1052} \approx 0.4750. $$

The predicted probability for this regimen and concentration is approximately \(47.50\%\). The coefficients \(\beta_A\) and \(\beta_B\) compare each active regimen with placebo at \(x_i=0\), which here is \(1.0\ \mathrm{mg/L}\). The reference concentration and the treatment reference group should be stated whenever the model is reported.

Worked Example: Specifying and Evaluating an Interaction Model

Suppose a hypothetical study allows concentration slopes to differ between placebo and active treatment. Use \(x_i=(C_i-1.0\ \mathrm{mg/L})/(1.0\ \mathrm{mg/L})\), \(T_i=0\) for placebo, and \(T_i=1\) for active treatment. Let \(\beta_0=-1.00\), \(\beta_C=0.60\), \(\beta_T=0.20\), and \(\beta_{CT}=0.30\). Calculate the event probability at \(C_i=3.0\ \mathrm{mg/L}\) for each treatment.

At this concentration, \(x_i=(3.0-1.0)/1.0=2.00\). For placebo, \(T_i=0\), so the interaction term is zero:

$$ \eta_{\mathrm{placebo}}=-1.00+(0.60)(2.00)+(0.20)(0)+(0.30)(2.00)(0)=0.2000, \qquad p_{\mathrm{placebo}}=\frac{1}{1+\exp(-0.2000)}\approx0.5498. $$

For active treatment, \(T_i=1\), and both the treatment and interaction terms contribute:

$$ \eta_{\mathrm{active}}=-1.00+(0.60)(2.00)+(0.20)(1)+(0.30)(2.00)(1)=1.000, \qquad p_{\mathrm{active}}=\frac{1}{1+\exp(-1.000)}\approx0.7311. $$

The model predicts approximately \(54.98\%\) for placebo and \(73.11\%\) for active treatment at \(3.0\ \mathrm{mg/L}\). These are calculations from the specified model; they do not establish that treatment caused the difference. The interaction changes the concentration slope on the logit scale from \(0.60\) to \(0.90\) per \(1.0\ \mathrm{mg/L}\) for active treatment.

Assumptions, Checks, and Alternatives

A Bernoulli logistic model is appropriate when each modeled outcome is one binary event or non-event, and the predictors and endpoint are defined for the same observation. The model also assumes that the logit of the event probability has the specified linear form in its included predictors. For the product likelihood above, observations must be independent conditional on the modeled predictors. A single participant contributing several visits does not automatically provide independent Bernoulli observations: within-participant dependence may require a model that represents repeated-measure structure rather than treating each record as unrelated.

Before fitting or interpreting the model, check the endpoint definition, event coding, concentration units, reference concentration, and treatment indicators. Then check whether the assumed predictor form is plausible over the observed concentration range and whether both outcome categories occur across the relevant covariate patterns. A concentration effect that is systematically curved on the logit scale, or treatment-specific patterns inconsistent with a shared slope, signals that the proposed linear predictor may be inadequate. Sparse combinations of treatment and concentration can also make fitted coefficients unstable; a numerical fit alone does not guarantee that the data support the chosen specification.

The main alternative for a binary endpoint is a model with a different link, such as a probit link. Such models also keep predictions within the probability range but use a different relationship between predictors and event probabilities. A linear probability model instead specifies probability as a linear function directly; it can produce predictions outside zero to one and does not use a Bernoulli logistic link. The logistic specification is especially convenient when the scientific model is intended to be linear in the logit, but it is not automatically correct merely because the outcome is binary. The link and predictor terms should be justified for the application.

Common pitfall: A treatment coefficient in a model with an interaction is not a treatment contrast at every concentration. In the interaction model, \(\beta_T\) is the treatment contrast in the linear predictor at \(x_i=0\), and the contrast at another concentration includes \(\beta_{CT}x_i\). State the concentration reference and include the interaction contribution when calculating predictions.

Finally, model coefficients and fitted probabilities describe the specified conditional model. An association between concentration and response is not, by itself, evidence of a causal concentration effect: treatment assignment, disease severity, or other factors may influence both observed concentration and response. The model’s scope is also limited by the endpoint definition and the concentrations represented in the data; extrapolating its linear predictor far beyond that range may yield probabilities near zero or one without reliable empirical support.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For \(Y_i=1\) indicating a response, write a Bernoulli logistic model with an intercept, scaled concentration \(x_i\), and binary treatment \(T_i\), assuming a common concentration slope.
  2. Let \(\eta_i=-0.40\). Calculate \(p_i\) to four significant figures.
  3. In a model containing \(x_iT_i\), what is the concentration slope on the logit scale for \(T_i=0\) and for \(T_i=1\)?
  4. Why is coding every treatment group with an indicator while also including an intercept redundant?
  5. A participant contributes six binary visits. What condition must hold for the simple product Bernoulli likelihood to treat those six records as independent contributions?

Solutions. 1. Write \(Y_i\mid x_i,T_i\sim\operatorname{Bernoulli}(p_i)\) and \(\operatorname{logit}(p_i)=\beta_0+\beta_Cx_i+\beta_TT_i\); then \(p_i=1/[1+\exp(-\eta_i)]\). 2. \(p_i=1/[1+\exp(0.40)]=1/(1+1.4918)\approx0.4013\). 3. In \(\eta_i=\beta_0+\beta_Cx_i+\beta_TT_i+\beta_{CT}x_iT_i\), the slope is \(\beta_C\) for \(T_i=0\) and \(\beta_C+\beta_{CT}\) for \(T_i=1\). 4. Exactly one group indicator equals one in each record, so their sum equals the intercept column; including all indicators and the intercept creates exact linear redundancy. 5. The visits must be independent conditional on the modeled predictors. Repeated records from one participant often do not satisfy this condition, so dependence must be assessed and modeled when present.

Clinical Biostats