Why Functional Form Matters
A continuous baseline covariate can be important for treatment assignment even when its effect is not well represented by a straight line on the log-odds scale. If the fitted form is too restrictive, a logistic model can produce plausible-looking probabilities while leaving systematic differences in that covariate between treated and untreated groups. For propensity score analyses, the practical question is not simply whether the model predicts treatment accurately: it is whether the resulting scores support adequate covariate balance in the analysis that follows.
Let \(A\) be a binary treatment indicator and let \(X\) be a continuous pre-treatment covariate. The propensity score is \(e(X)=P(A=1\mid X)\), or, with other measured baseline covariates \(Z\), \(e(X,Z)=P(A=1\mid X,Z)\). A logistic propensity model represents the log odds of treatment as a function of covariates. The choice between a linear, logarithmic, or piecewise-linear term determines the shape allowed for \(X\)'s relationship with treatment on that scale. It does not change the definition of the propensity score or by itself establish causal identification.
For example, when other covariates \(Z\) are included, a model using a linear term has the form
The coefficient \(\beta\) is the change in conditional log odds for a one-unit increase in \(X\), holding the other model terms fixed. This is a constraint: the log odds change at the same rate for every one-unit increase. The probability itself does not change by a constant amount per unit, because the inverse-logit transformation is nonlinear.
Three Useful Representations
A logarithmic term can be useful when \(X\) is positive and treatment odds are more plausibly related to proportional changes in \(X\) than to equal additive changes. The reference value \(c\) makes the logarithm dimensionless; choosing \(c\) changes the intercept but not the fitted shape when an intercept is included. In a model with \(\beta\log(X/c)\), multiplying \(X\) by a factor \(r\) changes the conditional log odds by \(\beta\log(r)\), and the corresponding conditional odds ratio is \(\exp\{\beta\log(r)\}\). The model remains monotonic in \(X\) if \(\beta\) is nonzero; taking a logarithm does not allow a U-shaped relationship.
A continuous piecewise-linear representation allows the slope to change at a knot \(k\). One common single-knot form is
Below the knot, the slope in the logit is \(\beta_1\); above it, the slope is \(\beta_1+\beta_2\). This form is continuous at \(k\), although its slope can change abruptly there. Opposite signs for the two slopes permit a peak or trough. A knot should be chosen and justified with care; trying many knots until one gives the desired result can overfit the treatment assignment pattern.
Worked Example: Comparing Linear and Logarithmic Terms
Suppose, purely hypothetically, that two candidate models for a positive baseline measurement \(X\) have the following fitted logits, with no other covariates. Compare their fitted treatment probabilities at \(X=10,20,40\).
Linear model. Let \(\operatorname{logit}(e)=-3+0.08X\). At \(X=10\), the logit is \(-3+0.08(10)=-2.2\), so \(e=1/\{1+\exp(2.2)\}\approx0.0998\). At \(X=20\), the logit is \(-3+0.08(20)=-1.4\), so \(e=1/\{1+\exp(1.4)\}\approx0.1978\). At \(X=40\), the logit is \(-3+0.08(40)=0.2\), so \(e=1/\{1+\exp(-0.2)\}\approx0.5498\).
Logarithmic model. Let \(\operatorname{logit}(e)=-2+0.9\log(X/10)\). At \(X=10\), the logit is \(-2\), giving \(e=1/\{1+\exp(2)\}\approx0.1192\). At \(X=20\), it is \(-2+0.9\log(2)\approx-1.3762\), giving \(e=1/\{1+\exp(1.3762)\}\approx0.2016\). At \(X=40\), it is \(-2+0.9\log(4)\approx-0.7523\), giving \(e=1/\{1+\exp(0.7523)\}\approx0.3203\).
Both models give increasing probabilities, but their increases differ across the range of \(X\). These are stipulated hypothetical coefficients, not results from a real study. The calculations illustrate the shapes implied by the models; they do not establish which representation is appropriate for an analysis.
Why a Piecewise Term Can Capture a Turning Point
The piecewise form is built from two lines that meet at the knot. For \(X\leq k\), \((X-k)_+=0\), so the logit is \(\alpha+\beta_1X\). For \(X>k\), the logit is \(\alpha+\beta_1X+\beta_2(X-k)\), which can be rearranged as \(\alpha-\beta_2k+(\beta_1+\beta_2)X\). At \(X=k\), both expressions equal \(\alpha+\beta_1k\). Thus the fitted logit, and therefore the fitted probability, is continuous at the knot. The slopes on each side can differ, and choosing slopes with opposite signs allows the probability to rise and then fall, or fall and then rise.
Worked Example: A Nonmonotone Assignment Pattern
Suppose a hypothetical logistic model uses a single knot at \(X=30\) and has fitted logit \(\operatorname{logit}(e)=-2+0.08X-0.13(X-30)_+\). This example illustrates a treatment-assignment pattern that rises to a peak and then declines.
At \(X=10\), the hinge term is zero. The logit is \(-2+0.08(10)=-1.2\), so \(e=1/\{1+\exp(1.2)\}\approx0.2315\). At the knot \(X=30\), the hinge term is also zero; the logit is \(-2+0.08(30)=0.4\), giving \(e=1/\{1+\exp(-0.4)\}\approx0.5987\). At \(X=50\), the hinge term is \(50-30=20\). The logit is \(-2+0.08(50)-0.13(20)=-0.6\), giving \(e=1/\{1+\exp(0.6)\}\approx0.3543\).
Below 30, the logit slope is \(0.08\) per unit; above 30, it is \(0.08-0.13=-0.05\) per unit. The conditional odds ratio for a one-unit increase is \(\exp(0.08)\approx1.083\) below the knot and \(\exp(-0.05)\approx0.9512\) above it. This flexible shape may be useful if supported by the data and subject-matter reasoning; a single knot does not automatically make it the correct model.
Assumptions, Checks, and Model Choice
The usual logistic fitting setup assumes that \(A\) is binary, the covariates are measured before treatment, and the conditional treatment probability is modeled through the logit as specified. Maximum-likelihood fitting also relies on suitable regularity conditions for stable estimation; for instance, the data must contain enough information to estimate the chosen terms. No functional form can compensate for important unmeasured confounding or a lack of treatment overlap. Causal interpretation additionally requires the relevant identification conditions, including consistency, conditional exchangeability given measured covariates, and positivity for the target population.
The balancing property applies to the true propensity score. A fitted score from a misspecified functional form need not balance covariates, even if its predicted treatment probabilities appear reasonable. After fitting and using scores for matching or weighting, examine covariate balance directly. Check means and standardized differences, but also inspect distributions: a balanced mean can conceal imbalances in spread, tails, or nonlinear patterns. Plot the covariate against treatment status and inspect treatment proportions or fitted probabilities over the covariate range. These are diagnostic aids, not proofs that all confounding has been removed.
A linear term is a useful starting representation when a constant log-odds slope is plausible and balance checks support it. A logarithmic term is a candidate for a positive, strongly right-skewed covariate when proportional changes are meaningful, but it imposes a monotone relationship. A piecewise-linear term can represent a change in slope or a turning point with a simple, interpretable structure. Compare candidates using substantive plausibility and post-fit balance, not treatment classification accuracy alone. A more elaborate fit can improve apparent prediction while making estimated scores unstable or extreme.
Worked Example: Using Grouped Treatment Rates as a Diagnostic
Suppose a hypothetical sample has 100 individuals in each of three baseline-measurement bands, centered at \(X=10,20,40\). The observed treated counts are 12, 22, and 33. A fitted logarithmic model gives probabilities \(0.1192, 0.2016,\) and \(0.3203\) at those centers. Compare the observed proportions with the fitted probabilities.
The observed proportions are \(12/100=0.12\), \(22/100=0.22\), and \(33/100=0.33\). The observed-minus-fitted differences are \(0.12-0.1192=0.0008\), \(0.22-0.2016=0.0184\), and \(0.33-0.3203=0.0097\). These grouped differences are small in this illustration, but they are not a formal test of model adequacy: the fitted values are at band centers, while individuals within each band can have different covariate values. A useful follow-up is to inspect finer groups or a plot of treatment status and fitted probabilities across the full covariate range, then assess balance after the intended matching or weighting procedure.
Common Pitfalls and Limitations
- Assuming a linear probability pattern. A linear term makes log odds linear in \(X\), not the probability. Interpret and inspect the fitted probabilities on their actual scale.
- Taking logs without checking the domain. \(\log(X/c)\) requires \(X>0\) and \(c>0\). A shift chosen to make nonpositive values loggable changes the meaning of the model and needs justification.
- Assuming a log term can represent any curvature. It is monotone for a nonzero coefficient and cannot capture a turning point by itself.
- Choosing a knot solely to improve prediction. A knot changes the fitted shape and consumes information. Sparse data near or beyond it can make the estimated slopes unstable.
- Treating a good treatment prediction score as evidence of balance. Check balance on the covariates after applying the score method; prediction performance is not the objective of propensity estimation.
All three forms are approximations. A linear or logarithmic form can miss real structure, while a piecewise form can fit noise or depend heavily on the knot. Functional-form choices should be transparent and checked against covariate balance and overlap. They do not resolve unmeasured confounding, and no single diagnostic certifies a propensity model as correct.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- In a logistic model with term \(\beta X\), what does \(\beta\) constrain, and why does it not imply a constant change in probability per unit?
- For the term \(\beta\log(X/5)\), what is the change in log odds when \(X\) doubles? State the domain condition.
- For \(\operatorname{logit}(e)=a+0.04X-0.10(X-20)_+\), give the logit slope below and above 20.
- Why can a logarithmic term not represent an assignment probability that rises and then falls with \(X\)?
Solutions. (1) \(\beta\) is the constant change in conditional log odds per one-unit increase in \(X\); the inverse-logit is nonlinear, so probability changes are not constant. (2) Doubling \(X\) changes log odds by \(\beta\log(2)\), and multiplies conditional odds by \(\exp\{\beta\log(2)\}\). The model requires \(X>0\), with reference value 5 also positive. (3) Below 20 the hinge is zero, so the slope is \(0.04\); above 20 it is \(0.04-0.10=-0.06\). (4) A single logarithmic term is monotone in positive \(X\) for a nonzero coefficient, so it cannot produce a turning point.