Novel g-computation algorithms for time-varying actions with recurrent and semi-competing events

This paper proposes and validates two novel g-computation algorithms that effectively address the simultaneous challenges of time-varying confounding and semi-competing events (where death precludes non-terminal outcomes) to estimate causal effects of time-varying interventions, demonstrating superior performance in simulations and revealing potential health benefits of smoking prevention in a longitudinal study of hypertension.

Alena Sorensen D'Alessio, Lucas M. Neuroth, Jessie K Edwards, Chantel L. Martin, Paul N Zivich

Published Thu, 12 Ma
📖 5 min read🧠 Deep dive

Imagine you are trying to figure out how a specific habit—like smoking—changes a person's life over several decades. You want to know: "If nobody had ever smoked, would fewer people have high blood pressure? Would fewer people have died?"

This sounds simple, but in the real world, life is messy. People get sick, they stop smoking, they start again, and sadly, some people pass away before the study ends. This creates a statistical nightmare for researchers.

Here is a simple breakdown of what this paper does, using some everyday analogies.

The Problem: The "Dead End" and the "Moving Target"

The researchers are dealing with two specific problems that make standard math fail:

  1. The "Dead End" (Semi-Competing Events):
    Imagine a video game where your character has two ways to lose: getting a "High Blood Pressure" badge or getting the "Game Over" (Death) screen.

    • If you get the "High Blood Pressure" badge, you can still keep playing. You might get better, or you might get worse.
    • But if you hit "Game Over" (Death), the game stops instantly. You can't get the "High Blood Pressure" badge after you die.
    • The Trap: Old methods often just delete anyone who hits "Game Over" from the data. But this is cheating! It's like saying, "We only counted the people who survived, so our game is safer than it really is." If you ignore the people who died, you might think smoking isn't that bad because the people who died (and would have had high blood pressure) are gone from the stats.
  2. The "Moving Target" (Time-Varying Confounding):
    Imagine you are tracking a runner.

    • At the start, they smoke.
    • Because they smoke, they get tired (a change in their body).
    • Because they are tired, they decide to stop smoking.
    • Because they stopped smoking, they start running faster.
    • The Trap: The runner's current state (tiredness) is caused by their past action (smoking), but it also changes their future action (quitting). Standard math gets confused here because the "cause" and the "effect" are tangled up like a ball of yarn.

The Solution: A New "Time-Travel" Algorithm

The authors, led by Alena Sorensen D'Alessio, invented two new computer algorithms (called g-computation) to solve this. Think of these algorithms as a Time-Travel Simulator.

Instead of just looking at the real data, the computer creates a "Parallel Universe" simulation:

  1. The Setup: The computer takes real people from the study (like the Add Health study, which followed thousands of Americans from their teens to their 50s).
  2. The "What If" Scenario: The computer says, "Okay, let's pretend nobody in this group ever smoked."
  3. The Simulation Loop: The computer runs the timeline forward, year by year.
    • It asks: "If this person didn't smoke, would they still be alive? Would they have high blood pressure?"
    • It uses complex math to guess what would happen to their health, their weight, and their habits based on what actually happened to similar people in the real world.
    • Crucially: If a person "dies" in the simulation, the computer remembers that. It doesn't delete them. It counts them as a death, but it also asks, "If they hadn't died, would they have had high blood pressure?" This fixes the "Dead End" problem.
  4. The Comparison: The computer runs the simulation twice:
    • Universe A: Everyone smokes (the real world).
    • Universe B: No one smokes (the intervention).
    • It then compares the two universes to see the difference in death rates and high blood pressure rates.

The Results: What Did They Find?

The researchers tested their new "Time-Travel Simulator" in two ways:

  1. The Test Drive (Simulation): They created fake data where they knew the exact answer. They tried their new method against old methods.

    • Result: The old methods were wrong (biased). They either ignored the deaths or got confused by the changing habits. The new method was accurate, like a GPS that actually knows the traffic.
  2. The Real World Test (Smoking & Blood Pressure): They applied their method to real data from the "Add Health" study (people aged 18 to 51).

    • The Question: What if we prevented all smoking from young adulthood to middle age?
    • The Finding: If no one had smoked, the study predicts that:
      • Fewer people would have died (about 1.6% fewer).
      • Fewer people would have high blood pressure (about 1.1% fewer).
    • Why it matters: The new method showed that the risk of death is real and significant. Old methods that just "deleted" the dead people would have missed this connection entirely.

The Big Picture

Think of this paper as upgrading the map for epidemiologists (the mapmakers of public health).

  • Old Map: "If you die, you disappear from the map. If your habits change, we get confused."
  • New Map: "We track you even if you die, and we understand that your habits change because of your health, and your health changes because of your habits."

The authors are saying: "As we study older and older groups of people, more of them will pass away during the study. If we don't use these new tools, we will get the wrong answers about how to keep people healthy. These new algorithms are the key to understanding the true impact of things like smoking, diet, or exercise over a lifetime."

They even made the code (the "blueprints" for the simulator) available for free so other scientists can use it to solve similar puzzles in their own research.