Logistic regression estimates the probability of a categorical, often binary, outcome from input variables through a logistic function. In causal analysis, it commonly predicts whether a patient received treatment from measured confounders, producing propensity scores rather than only 0-or-1 labels. section 5.3.2
A practical propensity-score workflow is:
- Organize one patient per row, with treatment T as a binary variable and confounders C1 through Cp as the remaining columns. section 5.3.2
- Fit a classifier such as logistic regression to estimate the probability that treatment equals 1 for each patient. section 5.3.2
- Compare alternative predictive models with cross-validation, and evaluate probability predictions with AUC rather than accuracy when ranking matters. section 5.3.2
A confounded treatment decision
Suppose a confounder Z affects treatment X and outcome Y. The probability of X = 1 is calculated with a logistic regression model whose probability depends on Z; X is then sampled from a Bernoulli distribution. This synthetic setup separates treatment assignment from the outcome’s effect and helps expose failures in causal estimation, such as an S-learner returning an ATE of zero. section 4.2.4
Table 5.1 Table describing whether each patient was treated (variable T) and their description in terms of confounders (C1, …, Cp)
|
T
|
C
1
|
…
|
Cp
|
|---|---|---|---|
|
t
1
|
c
1
1
|
…
|
c
1
p
|
|
…
|
…
|
…
|
…
|
|
t
n
|
c
n
1
|
…
|
c
n
p
|
Use the patient-by-treatment-and-confounder table to inspect the data structure required for propensity-score modeling. section 5.3.2











