Stabilized or Unstabilized IPTW: The Same Balance in a Pseudo-Population of 200 or 100

Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges
Stabilized or Unstabilized IPTW: The Same Balance in a Pseudo-Population of 200 or 100
On this page

อ่านฉบับภาษาไทย (Thai version)

Abstract

Inverse probability of treatment weighting (IPTW) does not try to give every patient the same weight. It tries to give treated and untreated patients the same distribution of confounders, so that the treatment effect is compared fairly. Unstabilized and stabilized IPTW follow that one principle and differ only in the size of the weights and of the weighted population, or pseudo-population, that they build. In a hand example of 100 patients, treatment followed disease severity: 57.1% of the treated and 33.3% of the untreated had high severity. Unstabilized weights, one over the probability of the treatment received, bring both arms to 50% high severity in a pseudo-population of 200. Stabilized weights multiply each arm's weights by that arm's share of patients and reach the same 50% in a pseudo-population of 100. Stabilization rescales the weights; it is not a second adjustment for confounding. This article builds both formulas by hand, shows why the balance cannot change, and sets out their limits.


Visual summary. Hand example of 100 patients: the same 50% high-severity balance in a pseudo-population of 200 or 100.

A drug given by severity

A hospital wants to know whether a drug lowers the risk of death. Nobody randomized it: in 100 patients whose disease severity was recorded before treatment, the clinicians chose who received it, and they gave it more often to the sicker patients. The question is how to compare the treated with the untreated fairly.

Why use IPTW in the first place?

In an observational study the drug is not given at random. The clinician decides according to how ill the patient is:

The problem is that severity also affects the risk of death. Because severity affects both who receives the drug and who dies, it is a confounder of the relation between treatment and outcome. If we compare the death rates of the treated and the untreated directly, the result can reflect both the effect of the drug and the difference in severity between the two groups.

What we actually want is the average treatment effect (ATE):

$$ATE = E[Y(1)] - E[Y(0)]$$

Here $Y(1)$ is the outcome a patient would have if treated and $Y(0)$ the outcome the same patient would have if untreated, the two potential outcomes. In words, within one and the same target population, we compare the risk of death if everyone received the drug with the risk if no one received it [1].

In reality we can never observe both situations in the same patient, so the comparison has to be built from the data we have. IPTW does it by weighting: it builds a pseudo-population in which treatment is no longer related to the confounders that we have measured and adjusted for adequately [1].

Why the inverse of a probability?

Look at the data of the 100 patients. Severity was measured before treatment started, and the patients fall into two groups: High severity and Low severity.

Hand example, 100 patients. Patients with high severity were more likely to receive the drug than patients with low severity.
SeverityTreatedUntreatedTotal
High401050
Low302050
Total7030100

The propensity score

The propensity score is defined as

$$e(X) = P(A = 1 \mid X)$$

where $A = 1$ means the patient received the drug, $A = 0$ means the patient did not, and $X$ is what we know about the patient before treatment, here severity.

  1. High severity

    \[ e(X) = \frac{40}{50} = 0.80 \]

    40 of the 50 High patients received the drug.

  2. Low severity

    \[ e(X) = \frac{30}{50} = 0.60 \]

    30 of the 50 Low patients received the drug.

Result: A High patient had a 0.80 chance of treatment and a Low patient a 0.60 chance.

Where the inverse comes from

Take the 50 High-severity patients. 40 of them received the drug, but only 10 did not.

  1. Let the treated stand for all 50 High patients

    \[ \frac{50}{40} = \frac{1}{0.80} = 1.25 \]

    To use the treated High patients as a stand-in for every High patient, each of them must count as 1.25 patients.

  2. Let the untreated stand for all 50 High patients

    \[ \frac{50}{10} = \frac{1}{0.20} = 5 \]

    To use the untreated High patients as a stand-in for every High patient, each of them must count as 5 patients.

Result: Each weight is one over the probability of the treatment the patient actually received. This is where inverse probability weighting comes from.

How unstabilized IPTW builds the pseudo-population

Once we know each patient's probability of the treatment they actually received, the unstabilized weight follows at once: one over that probability, $1/e(X)$ for a treated patient and $1/(1 - e(X))$ for an untreated one.

Hand example. Unstabilized weight for each group of patients.
Patient groupReal countFormulaWeight
High, treated40$1/0.80$1.25
High, untreated10$1/0.20$5.00
Low, treated30$1/0.60$1.67
Low, untreated20$1/0.40$2.50

Multiply each count by its weight

  1. High severity, treated

    \[ 40 \times 1.25 = 50 \]

    The 40 treated High patients now count as 50.

  2. High severity, untreated

    \[ 10 \times 5 = 50 \]

    The 10 untreated High patients also count as 50.

  3. Low severity, treated

    \[ 30 \times 1.667 \approx 50 \]

    The 30 treated Low patients count as about 50; the small gap is only rounding of the weight.

  4. Low severity, untreated

    \[ 20 \times 2.5 = 50 \]

    The 20 untreated Low patients count as 50.

Result: After unstabilized IPTW, every cell holds 50 weighted patients, so the treated and the untreated have the same severity distribution.

Hand example. Before weighting the treated arm is sicker; after unstabilized IPTW both arms have the same severity mix.
TreatedUntreated
Before weighting: patients7030
Before weighting: High severity57.1%33.3%
After unstabilized IPTW: weighted total100100
After unstabilized IPTW: High severity50%50%

But the weights add up to 200

Notice one more thing. There are 100 real patients, yet the weights add up to

$$100 + 100 = \boxed{200}$$

Unstabilized IPTW gives each treatment group a weighted total of 100 in this example. That does not mean 100 more real patients have appeared. It is the sum of the weights used to build the pseudo-population, the pseudo-population size.

The stabilized weight, built by hand

In the same 100 patients, the marginal probability of treatment, the share of all patients who received each treatment, is

$$P(A = 1) = \frac{70}{100} = 0.70$$$$P(A = 0) = \frac{30}{100} = 0.30$$

Stabilized IPTW takes the probability of the treatment each patient actually received in the whole population and uses it to multiply the unstabilized weight. The stabilized weight is [3, 4]

$$\boxed{SW_i = \frac{P(A = A_i)}{P(A = A_i \mid X_i)}}$$

The numerator is the share of that treatment group in the population. The denominator is the chance that this patient receives that treatment, given what we know about them, $X_i$.

  1. A High-severity patient who did not receive the drug: the numerator

    \[ P(A = 0) = 0.30 \]

    The share of all patients who went untreated.

  2. The denominator

    \[ P(A = 0 \mid \text{High}) = 1 - 0.80 = 0.20 \]

    The chance that a High-severity patient goes untreated.

  3. The stabilized weight

    \[ SW = \frac{0.30}{1 - 0.80} = \frac{0.30}{0.20} = \boxed{1.50} \]

    Each untreated High patient now counts as 1.50 instead of 5.

Result: For a High-severity patient who did not receive the drug, the stabilized weight is 1.50.

Hand example. Unstabilized and stabilized weight for every group of patients.
Patient groupUnstabilizedStabilized
High, treated1.250.875
High, untreated5.001.500
Low, treated1.6671.167
Low, untreated2.500.750
Hand example. The weighted population under each kind of weight.
SeverityUnstabilized, treatedUnstabilized, untreatedStabilized, treatedStabilized, untreated
High50503515
Low50503515
Total1001007030
Hand example. The result: two pseudo-populations of different size with the same severity balance.
Unstabilized IPTWStabilized IPTW
Weighted total200100
Treated / untreated100 / 10070 / 30
High severity in each arm50%50%
Hand example. Move the number treated in each severity level and switch the weight type. Because each score is the observed treated share, the total stays at 200 or 100 and both arms stay 50% High; only the stabilized arm totals move, with the real arm sizes. The panel opens on 40 of 50 and 30 of 50 treated.

Why stabilizing does not spoil the adjustment for confounding

This is the most important point statistically. Look only at the two groups of untreated patients, High and Low.

  1. Before stabilizing

    \[ \frac{w_{\text{High}}}{w_{\text{Low}}} = \frac{5}{2.5} = 2 \]

    An untreated High patient weighs twice as much as an untreated Low patient.

  2. After stabilizing

    \[ \frac{SW_{\text{High}}}{SW_{\text{Low}}} = \frac{1.5}{0.75} = 2 \]

    The same factor of 2.

Result: The relative importance of the two groups of patients is unchanged.

Proof from the rules of probability

To see why the IPTW formula really works, start from a rule of probability:

$$P(X, A = a) = P(A = a \mid X)\,P(X)$$

With the unstabilized weight:

$$\begin{aligned} & P(X, A = a)\,\frac{1}{P(A = a \mid X)} \\ &= \frac{P(A = a \mid X)\,P(X)}{P(A = a \mid X)} \\ &= \boxed{P(X)} \end{aligned}$$

The part that made receiving the treatment depend on $X$ is cancelled out mathematically.

With the stabilized weight:

$$\begin{aligned} & P(X, A = a)\,\frac{P(A = a)}{P(A = a \mid X)} \\ &= \boxed{P(A = a)\,P(X)} \end{aligned}$$

The distribution $P(X)$ is still there, exactly as before; it is only multiplied by the constant $P(A = a)$, which sets the size of each treatment group. That is why both methods balance the confounders in the same way in theory, given a correct propensity score and the necessary assumptions [1].

Formulas and differences side by side

N is the number of patients. The weighted totals and group proportions are expected values under the model's assumptions; in real data they are not always exactly equal to these values. In the hand example they are exact because each propensity score equals the observed treated share at its severity level.
Unstabilized IPTWStabilized IPTW
Treated$\frac{1}{e(X)}$$\frac{P(A = 1)}{e(X)}$
Untreated$\frac{1}{1 - e(X)}$$\frac{P(A = 0)}{1 - e(X)}$
Target estimandATEATE
Expected weighted total, binary treatment$2N$$N$
Treatment group proportionAbout 50:50About the original split
Confounder balanceBalancedThe same balance
Use both together?Choose one methodChoose one method

Limitations to understand correctly

Stabilized IPTW is not better than unstabilized IPTW in every situation. It rescales the weights and may reduce their variability, but it does not solve every problem of extreme weights: if a patient had a probability close to zero of receiving the treatment they actually received, that patient's weight can still be very large. The extreme-weights part of this series looks at such weights in detail.

Interestingly, when the treatment is binary and we estimate the risk difference or the risk ratio directly from the weighted outcome proportions of the two groups, stabilized and unstabilized weights, with no truncation or other change to the weights, give exactly the same point estimate. Each group's constant cancels when that group's weighted mean is computed. Any difference in precision therefore depends on the form of the analysis and on how the variance is computed [1].

Both methods still rest on the same key assumptions: conditional exchangeability, that is, no unmeasured confounding once the right variables are adjusted for; positivity, a real chance of either treatment for every kind of patient; consistency, that a patient's observed outcome is the potential outcome under the treatment they actually received; and a propensity score estimated well enough. In real research, check covariate balance with standardized mean differences (the balance part of this series shows how), and look at the distribution of the weights as well.

Common misreadings and their fixes

  • "Stabilized weights adjust for confounding a second time."

    Stabilized weights use the same propensity score as the unstabilized ones and add no information about the confounders.

    Fix: Stabilization multiplies every weight in an arm by that arm's share of patients. It rescales the pseudo-population and leaves the balance that the unstabilized weights achieved unchanged.

  • "A weighted total of 200 from 100 patients means extra patients were added."

    No patient was added or counted twice; each arm is weighted to stand for the whole source population.

    Fix: Read 200 as the sum of the weights that build the pseudo-population, not as a head count.

  • "0.80 is the share of treated patients."

    0.80 is the probability of treatment for a High-severity patient; the share treated in the whole population is 0.70.

    Fix: Put the conditional probability, given X, in the denominator of the weight, and the marginal share only in the numerator of the stabilized weight.

  • "Stabilized IPTW is always the better choice."

    It rescales the weights and may make them less variable, but a patient with a near-zero probability of the treatment received still gets a very large weight.

    Fix: Inspect the distribution of the weights whichever formula you use.

  • "For extra safety, apply both weights one after the other."

    The two formulas are alternative ways to estimate the same ATE; multiplying them divides by the probability of the treatment received twice, so the cancellation in the proof above no longer happens.

    Fix: Choose one method per analysis.

Glossary

inverse probability of treatment weighting (IPTW) (การถ่วงน้ำหนักด้วยส่วนกลับของความน่าจะเป็นในการได้รับการรักษา)
Weighting each patient by one over the probability of the treatment that patient actually received, so that the treated and the untreated share the same distribution of measured confounders.
pseudo-population (ประชากรเสมือน)
The weighted population, in which treatment no longer depends on the measured confounders.
average treatment effect (ATE) (ผลเฉลี่ยของการรักษาในประชากรทั้งหมด)
The difference in outcome risk had everyone in the target population been treated versus had no one been treated.
potential outcome (ผลลัพธ์ที่อาจเกิดขึ้น)
The outcome a patient would have under a given treatment; only the one for the treatment actually received is observed.
propensity score (คะแนนแนวโน้มการได้รับการรักษา)
The probability of treatment given what is known about the patient before treatment, e(X) = P(A = 1 | X).
unstabilized weight (น้ำหนักแบบไม่ปรับเสถียร)
One over the probability of the treatment a patient actually received, given X.
pseudo-population size (ขนาดของ pseudo-population)
The sum of the weights: about twice the sample size for unstabilized ATE weights with a binary treatment, about the sample size for stabilized weights.
marginal probability of treatment (สัดส่วนผู้ได้รับการรักษาในภาพรวม)
The share of all patients who received a given treatment, P(A = a); the numerator of the stabilized weight.
stabilized weight (น้ำหนักแบบปรับเสถียร)
The unstabilized weight multiplied by the marginal probability of the treatment received.
conditional exchangeability (ความแลกเปลี่ยนกันได้)
No unmeasured confounding once the right measured variables are adjusted for.
positivity (ข้อสมมติ positivity)
Every kind of patient has a non-zero chance of each treatment.
consistency
A patient's observed outcome equals their potential outcome under the treatment they actually received.
standardized mean difference (ผลต่างค่าเฉลี่ยมาตรฐาน)
The difference between groups in a covariate's mean divided by a pooled standard deviation, used to judge balance.

References

  1. Hernán MA, Robins JM. Causal inference: what if [Internet]. Boca Raton: Chapman & Hall/CRC; 2020. https://miguelhernan.org/whatifbook
  2. Xu S, Ross C, Raebel MA, Shetterly S, Blanchette C, Smith D. Use of stabilized inverse propensity scores as weights to directly estimate relative risk and its confidence intervals. Value Health. 2010;13(2):273-277. doi:10.1111/j.1524-4733.2009.00671.x https://doi.org/10.1111/j.1524-4733.2009.00671.x
  3. Robins JM, Hernán MA, Brumback B. Marginal structural models and causal inference in epidemiology. Epidemiology. 2000;11(5):550-560. doi:10.1097/00001648-200009000-00011 https://doi.org/10.1097/00001648-200009000-00011
  4. Cole SR, Hernán MA. Constructing inverse probability weights for marginal structural models. Am J Epidemiol. 2008;168(6):656-664. doi:10.1093/aje/kwn164 https://doi.org/10.1093/aje/kwn164

Key takeaways

  • IPTW aims to give the treated and the untreated the same distribution of confounders, not to give every patient the same weight: in the 100-patient example, 57.1% against 33.3% high severity becomes 50% in both arms.
  • Unstabilized weights, one over the probability of the treatment received, make each arm stand for the whole source population, so the weights of 100 patients add up to 200; that is a sum of weights, not extra patients.
  • Stabilized weights multiply each arm's weights by that arm's share of patients, 0.70 or 0.30, giving a pseudo-population of 100 with the original split and the same 50% balance; stabilization targets the size and variability of the weights, not confounding.
  • Within an arm the constant cancels, so ratios of weights stay the same (5/2.5 = 1.5/0.75 = 2); for a binary treatment, with weighted outcome proportions and no truncation, both give the same point estimate.
  • Choose one of the two formulas, never both; either way the analysis rests on exchangeability, positivity, consistency and a good propensity score, so check balance and the weight distribution.

Related in the wiki: [[extreme-propensity-weights-stabilization-truncation-trimming]] [[iptw-guide]] [[propensity-weighting-balance-check-and-model-revision]]

0
Message for International and Thai ReadersUnderstanding My Medical Context in ThailandRead more →Message for International and Thai ReadersUnderstanding My Broader Content Beyond MedicineRead more →

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment

Stabilized or Unstabilized IPTW: The Same Balance in a Pseudo-Population of 200 or 100 — Uniqcret