Tutorials › Marginal Structural Models › Sequential Factorization of Stabilized Weights

Weight Stabilization and Truncation · Tutorial 131 of 501

Sequential Factorization of Stabilized Weights

Learn to construct and verify a longitudinal stabilized weight by multiplying the correct numerator and denominator probabilities at each treatment decision.

Advanced 12 min read

What You'll Learn

  • Express the observed treatment sequence probability as a product of conditional probabilities.
  • Construct the stabilized weight from sequential numerator and denominator factors.
  • Calculate cumulative weights for binary treatment histories.
  • Prove the product identity and a mean-one property under stated conditions.
  • Diagnose errors caused by using the wrong history or the wrong treatment probability.

Why the Weight Accumulates Over Time

With repeated treatment decisions, a person’s weight reflects the probability of their entire observed treatment history, not just the probability of treatment at the final decision. At each time, the observed treatment contributes a numerator probability and a denominator probability. The cumulative stabilized weight is the product of those time-specific ratios.

This tutorial makes that product explicit. The earlier material on stabilized treatment weights as likelihood ratios introduced the ratio idea; here the focus is how the factors are built sequentially, how they combine, and how to check the calculation.

Histories and Sequential Probabilities

Suppose treatment is assigned at decision times \(t=1,\ldots,K\). Let \(A_t\) denote treatment at time \(t\), and write \(\bar A_t=(A_1,\ldots,A_t)\) for the treatment history through that time. Let \(X\) denote baseline covariates and \(L_t\) the covariates observed before treatment \(A_t\). The observed information available just before decision \(t\) is denoted \(H_t=(X,\bar L_t,\bar A_{t-1})\). At the first decision, \(\bar A_0\) is empty.

Write \(p_t(a\mid H_t)=P(A_t=a\mid H_t)\) for the denominator treatment probability. For the numerator, write \(q_t(a\mid G_t)\), where \(G_t\) is the history used for the numerator model. It is a subset or function of the available history \(H_t\); in a common specification it contains past treatment but not time-varying covariates. Both \(p_t(\cdot\mid H_t)\) and \(q_t(\cdot\mid G_t)\) must be probability distributions over the possible treatment values at decision \(t\).

Definition: The cumulative stabilized treatment weight through time \(k\) for a person with observed history \(\bar A_k\) is $$ SW_k=\prod_{t=1}^{k}\frac{q_t(A_t\mid G_t)}{p_t(A_t\mid H_t)}. $$ Each factor uses the probability of the treatment actually observed at that time. For binary treatment, if \(A_t=1\), the contribution uses the probability of 1; if \(A_t=0\), it uses the probability of 0.

The sequential denominator probability conditions on the observed pre-decision history, including relevant covariates measured before treatment. The numerator probability conditions on its specified, typically reduced, history. A ratio at time \(t\) is therefore not a ratio of two probabilities that can be chosen independently of the observed treatment and history.

Why the Product Is the Correct Factorization

The chain rule for conditional probability expresses the probability of the observed treatment sequence as a product of one-step conditional probabilities. Under the observed treatment process, that product is \(\prod_{t=1}^k p_t(A_t\mid H_t)\). The numerator process analogously contributes \(\prod_{t=1}^k q_t(A_t\mid G_t)\). Taking their ratio gives the cumulative weight.

Theorem: For any observed treatment history with positive sequential denominator probabilities, the ratio of the sequential numerator and denominator factors through time \(k\) equals the product of the time-specific ratios: $$ \frac{\prod_{t=1}^{k}q_t(A_t\mid G_t)} {\prod_{t=1}^{k}p_t(A_t\mid H_t)} = \prod_{t=1}^{k}\frac{q_t(A_t\mid G_t)}{p_t(A_t\mid H_t)}. $$

Proof. By the chain rule, the conditional probability assigned to the observed treatment sequence by the denominator treatment process is

$$ P(\bar A_k\text{ observed sequentially}\mid\text{histories}) =\prod_{t=1}^{k}p_t(A_t\mid H_t). $$

The numerator factors likewise multiply to \(\prod_{t=1}^{k}q_t(A_t\mid G_t)\). If each denominator factor is positive, division is valid. The ordinary rule for dividing finite products then gives the displayed identity. This is a ratio of treatment-process factors; it is not, by itself, a ratio for the full joint distribution of treatment and covariates. \(\square\)

Equivalently, the weight can be updated one decision at a time. Set \(SW_0=1\). Then, for \(k=1,\ldots,K\),

$$ SW_k=SW_{k-1}\frac{q_k(A_k\mid G_k)}{p_k(A_k\mid H_k)}. $$

This recursion follows directly by separating the \(k\)th term from the product. It is useful computationally: keep a running product, applying the next factor only after evaluating the probabilities for the treatment actually observed at that decision.

Worked Example: Two Binary Treatment Decisions

At time 1, suppose the denominator model assigns \(P(A_1=1)=0.40\), while the numerator model assigns \(P(A_1=1)=0.50\). The observed treatment is \(A_1=1\). At time 2, among people with \(A_1=1\), suppose the denominator probability of \(A_2=1\), given the observed pre-decision covariates, is \(0.80\). The numerator probability of \(A_2=1\), given its numerator history, is \(0.60\). The observed second treatment is \(A_2=0\).

At time 1 the observed treatment is 1, so the factor is \(0.50/0.40=1.25\).

At time 2 the observed treatment is 0. Use the probabilities of 0, which are the complements of the probabilities of 1: \(q_2(0)=1-0.60=0.40\) and \(p_2(0)=1-0.80=0.20\). The second factor is \(0.40/0.20=2\).

Multiplication gives \(SW_2=1.25\times2=2.50\). Checking with the sequence factors, the numerator probability is \(0.50\times0.40=0.20\), the denominator probability is \(0.40\times0.20=0.08\), and \(0.20/0.08=2.50\), as required.

More Than Two Decisions

A longer treatment history adds factors by the same rule; it does not change the meaning of any one factor. The following example shows the accumulation explicitly over three decisions.

Worked Example: A Three-Time-Point Product

For one person, the observed binary treatment history is \((A_1,A_2,A_3)=(0,1,1)\). Suppose the sequential probabilities for those observed values are:

  • At time 1, \(p_1(0)=0.70\) and \(q_1(0)=0.50\).
  • At time 2, given the observed first treatment and pre-decision history, \(p_2(1)=0.25\) and \(q_2(1)=0.40\).
  • At time 3, given the observed past and pre-decision history, \(p_3(1)=0.60\) and \(q_3(1)=0.30\).

The three factors are, in order, \(0.50/0.70=5/7\), \(0.40/0.25=8/5\), and \(0.30/0.60=1/2\). Thus

$$ SW_3=\frac{5}{7}\times\frac{8}{5}\times\frac{1}{2} =\frac{4}{7}\approx 0.5714. $$

As a check, the numerator sequence product is \(0.50\times0.40\times0.30=0.06\). The denominator sequence product is \(0.70\times0.25\times0.60=0.105\). Their ratio is \(0.06/0.105=4/7\), which agrees with the product of factors.

A Mean-One Property and Its Conditions

When each numerator probability is a proper conditional treatment distribution on a history available before the current treatment, the population mean of the cumulative weight is one under the observed treatment process. This is a property of the exact probabilities, not a guarantee that the average of fitted weights in a finite sample will equal one.

Theorem: Suppose, for every \(t\), \(p_t(\cdot\mid H_t)\) is the true conditional distribution of \(A_t\) given \(H_t\), and \(q_t(\cdot\mid G_t)\) is a normalized probability distribution with \(G_t\) contained in the information available before \(A_t\). Suppose also that \(p_t(a\mid H_t)>0\) whenever \(q_t(a\mid G_t)>0\), almost surely. Then \(E[SW_k]=1\) for each \(k\).

Proof. Let \(SW_0=1\). Given the pre-decision history \(H_t\), \(SW_{t-1}\) and \(q_t(\cdot\mid G_t)\) are known. By the conditional distribution \(p_t\),

$$ \begin{aligned} E\left[\frac{q_t(A_t\mid G_t)}{p_t(A_t\mid H_t)} \middle| H_t\right] &=\sum_a p_t(a\mid H_t) \frac{q_t(a\mid G_t)}{p_t(a\mid H_t)}\\ &=\sum_a q_t(a\mid G_t)=1. \end{aligned} $$

The positivity condition makes the ratios well defined wherever the numerator assigns positive probability. Using the recursion and conditional expectation,

$$ E[SW_t] =E\left[SW_{t-1} E\left\{\frac{q_t(A_t\mid G_t)}{p_t(A_t\mid H_t)} \middle|H_t\right\}\right] =E[SW_{t-1}]. $$

Repeating this equality from \(t=k\) down to \(t=1\) gives \(E[SW_k]=E[SW_0]=1\). \(\square\)

This result does not say that every subgroup has mean weight one, nor that an estimated sample mean must equal one. It also does not establish causal identification on its own. Causal interpretation requires the relevant assumptions for the treatment and outcome setting, including appropriate positivity and control of confounding.

Worked Example: Using Complements for the Observed Treatment

Suppose at the first of two decisions the observed treatment is \(A_1=0\), with \(p_1(1)=0.30\) and \(q_1(1)=0.40\). At the second decision, the observed treatment is \(A_2=1\), with \(p_2(1\mid H_2)=0.50\) and \(q_2(1\mid G_2)=0.20\).

For the first decision, the observed value is 0, so \(p_1(0)=1-0.30=0.70\) and \(q_1(0)=1-0.40=0.60\). Its factor is \(0.60/0.70=6/7\). At the second decision, the observed value is 1, so the factor is \(0.20/0.50=2/5\). Therefore

$$ SW_2=\frac{6}{7}\times\frac{2}{5}=\frac{12}{35}\approx0.3429. $$

The ratio of sequence products confirms the result: \((0.60\times0.20)/(0.70\times0.50)=0.12/0.35=12/35\).

Diagnostics, Comparisons, and Common Errors

The factorization gives several direct checks. For each person and decision, verify that the treatment value used in the numerator and denominator is the observed value; that the conditioning history corresponds to information available before that decision; and that the cumulative weight equals both the product of the factors and the ratio of the two sequence products. For binary treatment, confirm that the probability for treatment 0 is the complement of the probability for treatment 1. A zero denominator probability for an observed treatment makes the corresponding weight undefined, signaling a positivity or model-support problem rather than an arithmetic problem.

An unstabilized treatment weight uses numerator factors equal to one, so it is the product of the reciprocals of the observed-treatment denominator probabilities. A stabilized weight retains numerator probabilities and can therefore have a different scale and distribution. Alternatively, one may calculate joint sequence probabilities directly, but the sequential form makes the history used at each decision visible and is usually easier to audit. Truncation is a subsequent modification of weights, not part of this factorization.

  • Wrong treatment value: using \(P(A_t=1)\) when the person received \(A_t=0\) gives the wrong factor. Use \(P(A_t=0)=1-P(A_t=1)\) for binary treatment.
  • Wrong denominator history: omitting relevant pre-decision history changes the conditional probability being used. Match the denominator to the stated treatment model and decision time.
  • Mixing histories across times: the numerator at time \(t\) and denominator at time \(t\) must refer to the same observed treatment decision, even though their conditioning histories can differ.
  • Reading a finite-sample average as a theorem: the mean-one result concerns exact probabilities under its assumptions; fitted weights need not average exactly one.

A final limitation is that the product can become very small or very large when one or more observed-treatment denominator probabilities are close to zero. The factorization identifies why such values arise, but does not remove them. Weight diagnostics and any later decision about truncation must be considered separately.

Check Your Understanding

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

  1. For binary treatment, a person receives \(A_t=0\), while the numerator and denominator models give probabilities of 1 equal to 0.35 and 0.20. What is the time-specific factor?
  2. Why does a cumulative stabilized weight contain one ratio for each treatment decision?
  3. At two decisions the observed-treatment numerator probabilities are 0.4 and 0.3, and the denominator probabilities are 0.5 and 0.6. Calculate the cumulative weight.
  4. State the positivity condition needed to define the sequential ratios.
  5. Does the mean-one property guarantee that fitted weights in a finite sample average exactly one?

Solutions. (1) The probabilities for the observed value 0 are \(0.65\) and \(0.80\), so the factor is \(0.65/0.80=0.8125\). (2) The chain rule factors the probability of the full treatment sequence into its sequential conditional probabilities, and the ratio of the two sequence products is the product of the time-specific ratios. (3) \((0.4/0.5)(0.3/0.6)=0.8\times0.5=0.4\). (4) The denominator probability must be positive whenever the numerator assigns positive probability to that treatment, almost surely. (5) No. The mean-one result is a population statement for exact probabilities under the theorem’s conditions; estimated finite-sample weights need not have mean exactly one.

Clinical Biostats