36  Incremental effects for continuous exposures

Published

October 5, 2026

The LMTP chapter answered questions like “what if every unit’s dose were one unit lower?” That shift needs positivity at the shifted dose. A unit whose dose sits near the edge of the support, or just beside a gap in it, is moved to a dose that no comparable unit ever received. Schindl, Shen, and Kennedy (2026) study an intervention that avoids this. Instead of moving each unit’s dose, it reweights the distribution each unit’s dose is drawn from, so that higher (or lower) doses become more likely. Doses the unit could never receive stay impossible.

For a binary treatment this is the incremental propensity score intervention of Kennedy (2019), which multiplies every unit’s odds of treatment by a factor. npcausal::ipsi() estimates it, and lmtp::ipsi() gives a shift function for binary exposures that scales the probability of treatment by a risk ratio. This chapter is about the continuous version, for which the authors provide replication code but no package. We write the estimator, check it in a simulation, and apply it to the authors’ example, political ads and campaign contributions.

36.1 The exponential tilt

We observe covariates \(X\), a dose \(A\) and an outcome \(Y\). Let \(\pi(a \mid x)\) be the conditional distribution of the dose and \(\mu(x, a) = E(Y \mid X = x, A = a)\) the outcome regression. For a number \(\delta\), the tilted distribution of the dose is (Schindl, Shen, and Kennedy 2026, eq. 1; the construction is from Díaz and Hejazi 2020)

\[ q_\delta(a \mid x) = \frac{e^{\delta a}\, \pi(a \mid x)}{\int e^{\delta t}\, \pi(t \mid x)\, dt}. \tag{36.1}\]

The denominator only makes the result integrate to one. On the log scale, \(\log q_\delta(a \mid x) = \log \pi(a \mid x) + \delta a - \text{const}\): we add a line of slope \(\delta\) to the log density, which tips it toward high doses when \(\delta > 0\) and toward low doses when \(\delta < 0\). That is why it is called a tilt. It goes back to Esscher (1932) in actuarial work and is the standard device in importance sampling. A normal density with mean \(m\) and variance \(s^2\), tilted by \(\delta\), becomes a normal with mean \(m + \delta s^2\) and the same variance: adding \(\delta a\) to the exponent \(-(a - m)^2/(2s^2)\) and completing the square moves the centre to \(m + \delta s^2\) and leaves the coefficient on \(a^2\) alone. On a bounded support it cannot shift forever, so the mass piles up against the edge, and as \(\delta \to \infty\) all of it ends up at the top dose.

Two features matter for what follows. First, \(\delta\) is not a dose. It is the slope of the log likelihood ratio between \(q_\delta\) and \(\pi\), measured in one over the units of \(A\). The dose change it implies is the change in the conditional mean. The derivative of the tilted mean with respect to \(\delta\) is the tilted variance, so for small \(\delta\) the change is about \(\delta \operatorname{var}(A \mid X)\). Second, where \(\pi(a \mid x) = 0\), so is \(q_\delta(a \mid x)\). The tilt never sends anyone to a dose they could not have received.

The estimand is the mean outcome when \(X\) keeps its distribution and each unit’s dose is drawn from \(q_\delta\) (Schindl, Shen, and Kennedy 2026, eq. 2):

\[ \psi(\delta) = E\left[\int \mu(X, a)\, q_\delta(a \mid X)\, da\right]. \tag{36.2}\]

Under consistency and conditional exchangeability, \(\psi(\delta)\) is identified by Equation 36.2, and it needs no positivity, because the integral only uses \(\mu\) where \(\pi\) is positive. At \(\delta = 0\) the tilt does nothing and \(\psi(0) = E(Y)\). That gives an exact check on any estimator.

36.2 Tilt or shift

The two interventions differ in what they act on. A shift, the modified treatment policy of Díaz Muñoz and Laan (2012) and Haneuse and Rotnitzky (2013) that lmtp estimates, acts on each unit’s own dose: it replaces the observed \(A\) with \(A + s\), or with \(A + s\) only when that dose is still feasible. A tilt acts on the distribution the dose is drawn from. Each unit keeps its covariates and receives a new dose drawn from \(q_\delta(\cdot \mid X)\), and its observed dose plays no part.

Four differences follow. A shift needs positivity at the shifted dose, \(\pi(a + s \mid x) > 0\) wherever \(\pi(a \mid x) > 0\); a tilt needs none. A shift moves everyone by \(s\) in dose units; a tilt moves the conditional mean by about \(\delta \operatorname{var}(A \mid X)\), so units whose dose is more uncertain given their covariates move further. The efficient influence function of a shift weights residuals by the density ratio \(\pi(A - s \mid X)/\pi(A \mid X)\) (Díaz et al. 2023), which lmtp estimates with a classifier; the tilt weights them by \(e^{\delta A}/E(e^{\delta A} \mid X)\). And when the dose is normal given \(X\) with variance \(\sigma^2(X)\), the tilt by \(\delta\) is exactly a shift by \(\delta\sigma^2(X)\), by the completing-the-square argument above, so with constant variance the two are the same intervention. They part ways when the support is bounded, lumpy or has holes, which is the setting where the shift’s positivity condition bites.

36.3 Efficiency, and why the tilt size matters

Write \(E_Q(\mu \mid X) = \int \mu(X, a)\, q_\delta(a \mid X)\, da\) for the regression averaged over the tilted distribution. For bounded \(\delta\), the efficient influence function is the following. It is Proposition 1 of Schindl, Shen, and Kennedy (2026), who write it as three terms that add up to this form, and it was first derived by Díaz and Hejazi (2020).

\[ \varphi(Z; \delta) = \frac{q_\delta(A \mid X)}{\pi(A \mid X)}\bigl\{Y - E_Q(\mu \mid X)\bigr\} + E_Q(\mu \mid X) - \psi(\delta), \tag{36.3}\]

and the one-step estimator replaces the nuisances by cross-fitted estimates and averages \(\hat\varphi + \hat\psi\) over the sample. The likelihood ratio in Equation 36.3 has a simple form, \(q_\delta(A \mid X)/\pi(A \mid X) = e^{\delta A} / \int e^{\delta t} \pi(t \mid X)\, dt\), by Equation 36.1, so we never need the density at the observed dose, only integrals against it.

That ratio grows with \(\delta\). If \(\pi\) is uniform on \([0, 1]\), it equals \(\delta e^{\delta a}/(e^\delta - 1)\), which is at least \(\delta\) at \(a = 1\) (Schindl, Shen, and Kennedy 2026, sec. 4.1). Schindl, Shen, and Kennedy (2026) show that, when the dose density is bounded below on an interval at the top of the support (they call this weak positivity), the variance of \(\varphi\) is bounded above and below by multiples of \(\delta\) (their Lemma 1). A two-point argument then gives a minimax lower bound of order \(\sqrt{\delta / n}\) for any estimator (their Theorem 2), and the cross-fitted one-step estimator attains it (their Theorems 3 and 4). The effective sample size is \(n / \delta\). Without weak positivity, for example when the density goes to zero at the top edge, the variance can grow like any power of \(\delta\) (their Section 10). As \(\delta \to \infty\) in both directions around an interior dose \(a'\), a “reflected” tilt also gives an estimate of the dose-response curve \(E(Y^{a'})\), with \(\delta\) playing the role of an inverse bandwidth. We come back to that at the end.

36.4 Implementing it

The paper estimates \(\pi(a \mid x)\) on a grid of design points \(a_j\) by regressing the kernel-transformed outcome \(K_h(A - a_j)\) on \(X\) (their Section 5.1), since \(E\{K_h(A - a) \mid X = x\}\) is close to \(\pi(a \mid x)\) for small \(h\). The integrals in Equation 36.1 and \(E_Q(\mu \mid X)\) are then weighted sums over the grid. We keep that approach and change four things.

The first is the bandwidth. The authors’ code chooses \(h\) by the cross-validated RMSE of the regression of \(K_h(A - a_j)\) on \(X\). The variance of \(K_h(A - a)\) is of order \(1/h\), so the criterion is not comparable across bandwidths. Run on a subsample of the application data, it picks an end of its grid at every design point: the largest bandwidth wherever doses are nearby, and the smallest wherever the design point falls between the discrete dose values, since there a narrow kernel sees no data and its target is close to zero. We fix \(h\) by Silverman’s rule. The second is normalisation. Their \(\hat\pi\) for \(\psi(\delta)\) is not rescaled to integrate to one, so \(\hat q_\delta / \hat\pi\) is off by a factor \(1 / \int \hat\pi\), and \(\hat\psi(0)\) need not equal \(\bar Y\). We renormalise each unit’s density. The third is the edge of the support. A Gaussian kernel loses about half its mass at the boundary, which is exactly where the tilt puts its weight, so we reflect the kernel at both ends. The fourth is specific to the application: 12% of the ZIP codes there have no ads at all, so many units share the dose \(A = 0\) exactly and no smooth density describes them. The tilt in Equation 36.1 still works: the zero dose keeps weight \(e^{0} = 1\), so \(q_\delta / \pi = e^{\delta A} / \nu(X)\) with \(\nu(x) = E(e^{\delta A} \mid X = x)\), also at \(A = 0\). We estimate \(P(A = 0 \mid X)\) with a classification forest and fit the kernel to the positive doses only. The influence function keeps the form of Equation 36.3, since the derivation behind Proposition 1 uses only that \(q_\delta/\pi\) is a likelihood ratio, which it still is when some units have dose exactly zero. The simulation below supports this: with the true dose distribution the estimator is unbiased with 95% coverage. The paper instead smooths the zeros into the density.

The paper also mentions a version with no density at all (their Remark 3). Since \(E_Q(\mu \mid X) = \eta(X)/\nu(X)\) with \(\eta(x) = E\{e^{\delta A}\mu(X, A) \mid X = x\}\), both pieces are regressions on \(X\). The estimated influence value is \(e^{\delta A}(Y - \hat\eta/\hat\nu)/\hat\nu + \hat\eta/\hat\nu\). Its expectation given \(X\) is \(\eta/\hat\nu - \nu\hat\eta/\hat\nu^2 + \hat\eta/\hat\nu\), and subtracting \(\eta/\nu\) leaves a bias of \((\hat\nu - \nu)(\hat\eta/\hat\nu - \eta/\nu)/\hat\nu\), a product of errors, so it is as doubly robust as the density version. The authors report that it is unstable, and we include it in the simulation to see.

All four estimators below share the outcome forest and the cross-fitting. tilt_grid() takes a function that returns the conditional dose distribution on a grid, so the same code runs with ours, with the paper’s, and with the true distribution in the simulation.

Show the estimator code
library(ranger)

# ---- Our estimator: tilts through regressions on X -------------------------
# With nu(x) = E[exp(delta A) | X = x] and eta(x) = E[exp(delta A) mu(X, A) | X = x],
# the tilted mean of mu is eta / nu and q / pi at the observed dose is
# exp(delta A) / nu. Both are regressions on X, so no conditional density is
# needed and an atom in the dose distribution (here, A = 0) is handled as it is.
# The influence value is (q / pi)(Y - eta / nu) + eta / nu. eta is fitted to
# exp(delta A) mu_hat(X, A), using out-of-bag predictions of mu on the training
# fold. Exponentials are scaled by exp(-delta c) with c = max(A) for delta > 0,
# which cancels in every ratio. With shift = TRUE we also return the implied
# change in the mean dose, E_Q(A | X) - E(A | X), averaged over units.
tilt_regression <- function(y, a, x, deltas, folds, shift = FALSE, cluster = NULL,
                            num.trees = 200, threads = 1) {
  x  <- as.data.frame(x)
  n  <- length(y)
  phi <- matrix(NA_real_, n, length(deltas))
  dA  <- matrix(NA_real_, n, length(deltas))
  reg <- function(target, tr, va) {
    f <- ranger(t ~ ., data = data.frame(x[tr, , drop = FALSE], t = target),
                num.trees = num.trees, num.threads = threads)
    predict(f, data = x[va, , drop = FALSE], num.threads = threads)$predictions
  }
  for (k in sort(unique(folds))) {
    va <- which(folds == k); tr <- which(folds != k)
    fmu <- ranger(y ~ ., data = data.frame(x[tr, , drop = FALSE], a = a[tr], y = y[tr]),
                  num.trees = 500, num.threads = threads)
    mu_oob <- fmu$predictions
    if (shift) ea0 <- reg(a[tr], tr, va)
    for (j in seq_along(deltas)) {
      d   <- deltas[j]
      c0  <- if (d > 0) max(a) else 0
      t   <- exp(d * (a[tr] - c0))
      nu  <- reg(t, tr, va)
      eq  <- reg(t * mu_oob, tr, va) / nu
      qp  <- exp(d * (a[va] - c0)) / nu
      phi[va, j] <- qp * (y[va] - eq) + eq
      if (shift) dA[va, j] <- reg(t * a[tr], tr, va) / nu - ea0
    }
  }
  out <- data.frame(delta = deltas, est = colMeans(phi), se = if_se(phi))
  if (!is.null(cluster)) out$se_cluster <- if_se(phi, cluster)
  if (shift) out$mean_shift <- colMeans(dA)
  out
}

# ---- Conditional law of the dose on a grid ----------------------------------
# pi(a | x) at each of D design points a_j is the regression on X of the
# kernel-transformed outcome K_h(A - a_j), as in Section 5.1 of the paper, with
# two changes to the authors' code: h is fixed by Silverman's rule (their CV on
# the RMSE of K_h always picks the largest h) and each unit's density is
# renormalised to integrate to one. With atom = TRUE (our default) the zeros
# get their own probability p0(x) from a classification forest and the kernel
# is fitted to the positive doses only; with reflect = TRUE the kernel is
# reflected at the ends of the support so it does not lose mass there. The
# paper's version is atom = FALSE, reflect = FALSE.
fit_kernel_law <- function(a_tr, x_tr, x_va, atom = TRUE, reflect = TRUE, D = 50,
                           num.trees = 100, threads = 1) {
  p0 <- rep(0, nrow(x_va))
  if (atom) {
    d0 <- data.frame(x_tr, zero = factor(a_tr == 0, levels = c(FALSE, TRUE)))
    f0 <- ranger(zero ~ ., data = d0, probability = TRUE,
                 num.trees = 300, num.threads = threads)
    p0 <- predict(f0, data = x_va, num.threads = threads)$predictions[, "TRUE"]
    x_tr <- x_tr[a_tr > 0, , drop = FALSE]; a_tr <- a_tr[a_tr > 0]
  }
  L <- min(a_tr); U <- max(a_tr); h <- bw.nrd0(a_tr)
  ag <- L + (U - L) * (seq_len(D) - 0.5) / D
  Fh <- sapply(ag, function(g) {
    k <- dnorm((a_tr - g) / h)
    if (reflect) k <- k + dnorm((2 * L - a_tr - g) / h) + dnorm((2 * U - a_tr - g) / h)
    f <- ranger(k ~ ., data = data.frame(x_tr, k = k / h),
                num.trees = num.trees, num.threads = threads)
    predict(f, data = x_va, num.threads = threads)$predictions
  })
  list(p0 = p0, agrid = matrix(ag, nrow(x_va), D, byrow = TRUE),
       W = Fh / rowSums(Fh), da = (U - L) / D)
}

mu_on_grid <- function(fmu, x_va, agrid, threads = 1) {
  G  <- ncol(agrid)
  xx <- x_va[rep(seq_len(nrow(x_va)), times = G), , drop = FALSE]
  pr <- predict(fmu, data = data.frame(xx, a = as.vector(agrid)),
                num.threads = threads)$predictions
  matrix(pr, nrow(x_va), G)
}

# Grid estimator for a given conditional law: law(a_tr, x_tr, x_va) returns an
# atom probability p0 at A = 0, a dose grid, weights summing to one per unit and
# the cell width da. Used with fit_kernel_law and, in the simulation, the truth.
tilt_grid <- function(y, a, x, deltas, folds, law, cluster = NULL, threads = 1) {
  x <- as.data.frame(x)
  n <- length(y)
  phi <- matrix(NA_real_, n, length(deltas))
  dA  <- matrix(NA_real_, n, length(deltas))
  for (k in sort(unique(folds))) {
    va <- which(folds == k); tr <- which(folds != k)
    fmu <- ranger(y ~ ., data = data.frame(x[tr, , drop = FALSE], a = a[tr], y = y[tr]),
                  num.trees = 500, num.threads = threads)
    f    <- law(a[tr], x[tr, , drop = FALSE], x[va, , drop = FALSE])
    ea0  <- (1 - f$p0) * rowSums(f$W * f$agrid)               # E(A | X)
    mu_g <- mu_on_grid(fmu, x[va, , drop = FALSE], f$agrid, threads)
    mu_0 <- predict(fmu, data = data.frame(x[va, , drop = FALSE], a = 0),
                    num.threads = threads)$predictions
    for (j in seq_along(deltas)) {
      d  <- deltas[j]
      c0 <- if (d > 0) max(a) else 0
      # exact integral of exp(delta a) over each grid cell of width da
      cf <- if (d == 0) 1 else sinh(d * f$da / 2) / (d * f$da / 2)
      ew <- cf * f$W * exp(d * (f$agrid - c0))
      nu <- f$p0 * exp(-d * c0) + (1 - f$p0) * rowSums(ew)
      eq <- (f$p0 * exp(-d * c0) * mu_0 + (1 - f$p0) * rowSums(ew * mu_g)) / nu
      qp <- exp(d * (a[va] - c0)) / nu
      phi[va, j] <- qp * (y[va] - eq) + eq
      dA[va, j]  <- (1 - f$p0) * rowSums(ew * f$agrid) / nu - ea0
    }
  }
  out <- data.frame(delta = deltas, est = colMeans(phi), se = if_se(phi),
                    mean_shift = colMeans(dA))
  if (!is.null(cluster)) out$se_cluster <- if_se(phi, cluster)
  out
}

# Standard error of a mean of influence values, one column per estimand:
# iid by default, or clustered when units share a cluster (here, a market).
# With a cluster, the estimators return both.
if_se <- function(phi, cluster = NULL) {
  n <- nrow(phi)
  if (is.null(cluster)) return(apply(phi, 2, sd) / sqrt(n))
  ctr <- sweep(phi, 2, colMeans(phi))
  sqrt(colSums(rowsum(ctr, cluster)^2)) / n
}

# Reflected tilt at interior doses a1 (dose-response): tilt up below a1 and
# down above it, with side weights omega = P(A <= a1 | X) and 1 - omega. The
# atom at 0 lies below every a1 > 0. The influence value is (r / pi)(Y - U) + U,
# where U is the tilted mean of mu on the side of a1 where the unit's dose lies.
reflect_grid <- function(y, a, x, a1s, delta, folds, law, cluster = NULL,
                         threads = 1) {
  x <- as.data.frame(x)
  n <- length(y)
  phi <- matrix(NA_real_, n, length(a1s))
  cf  <- function(da) sinh(delta * da / 2) / (delta * da / 2)
  for (k in sort(unique(folds))) {
    va <- which(folds == k); tr <- which(folds != k)
    fmu <- ranger(y ~ ., data = data.frame(x[tr, , drop = FALSE], a = a[tr], y = y[tr]),
                  num.trees = 500, num.threads = threads)
    f    <- law(a[tr], x[tr, , drop = FALSE], x[va, , drop = FALSE])
    mu_g <- mu_on_grid(fmu, x[va, , drop = FALSE], f$agrid, threads)
    mu_0 <- predict(fmu, data = data.frame(x[va, , drop = FALSE], a = 0),
                    num.threads = threads)$predictions
    for (j in seq_along(a1s)) {
      a1  <- a1s[j]
      lo  <- f$agrid <= a1
      elo <- cf(f$da) * f$W * exp(delta * (f$agrid - a1)) * lo     # at most 1
      ehi <- cf(f$da) * f$W * exp(-delta * (f$agrid - a1)) * !lo   # at most 1
      p0s <- f$p0 * exp(-delta * a1)
      D1  <- p0s + (1 - f$p0) * rowSums(elo)
      D2  <- (1 - f$p0) * rowSums(ehi)
      om  <- f$p0 + (1 - f$p0) * rowSums(f$W * lo)
      m1  <- (p0s * mu_0 + (1 - f$p0) * rowSums(elo * mu_g)) / D1
      m2  <- ((1 - f$p0) * rowSums(ehi * mu_g)) / D2
      low <- a[va] <= a1
      rp  <- ifelse(low, om * exp(delta * (a[va] - a1)) / D1,
                         (1 - om) * exp(-delta * (a[va] - a1)) / D2)
      U   <- ifelse(low, m1, m2)
      phi[va, j] <- rp * (y[va] - U) + U
    }
  }
  out <- data.frame(a1 = a1s, delta = delta, est = colMeans(phi), se = if_se(phi))
  if (!is.null(cluster)) out$se_cluster <- if_se(phi, cluster)
  out
}

36.5 Simulation

We check two things: whether the one-step estimator is right when the dose distribution is known, and what estimating it costs. The covariates \(X_1\) and \(X_2\) are independent uniforms on \((0, 1)\). With probability \(\operatorname{expit}(-1.5 + X_1)\) the dose is zero. Otherwise it is drawn from a density on \((0, 1)\) that depends on \(X_2\) and is at least \(0.5\) everywhere, so weak positivity holds at both edges. The outcome is \(Y = 1 + X_1 + X_2 + 2A + \sin(3A) + \varepsilon\) with standard normal \(\varepsilon\), and the true \(\psi(\delta)\) comes from numerical integration.

All estimators are the cross-fitted one-step estimator of Equation 36.3 with the same outcome forest. They differ only in the dose distribution plugged into it: the known one that generated the data (the oracle), which no one has in practice; ours, which models the zeros separately; and the paper’s, which smooths the zeros into the density. We use \(n = 1000\) with 200 replications and \(n = 4000\) with 100, and tilts from \(-10\) to \(25\). The run takes about two hours on six cores, so the code reads saved results.

Show the simulation code
mu_true <- function(x1, x2, a) 1 + x1 + x2 + 2 * a + sin(3 * a)
p0_true <- function(x1) plogis(-1.5 + x1)
# density of A given A > 0: half Uniform(0, 1), half Beta(1 + 2 x2, 1), so it is
# at least 0.5 on all of [0, 1] (weak positivity at both edges)
f_pos <- function(a, x2) 0.5 + 0.5 * dbeta(a, 1 + 2 * x2, 1)

sim_data <- function(n) {
  x1 <- runif(n); x2 <- runif(n)
  zero <- runif(n) < p0_true(x1)
  pos <- ifelse(runif(n) < 0.5, runif(n), rbeta(n, 1 + 2 * x2, 1))
  a <- ifelse(zero, 0, pos)
  y <- mu_true(x1, x2, a) + rnorm(n)
  list(y = y, a = a, x = data.frame(x1 = x1, x2 = x2))
}

# True psi(delta) by quadrature: midpoint grids over (x1, x2) and over a.
true_psi <- function(deltas, nx = 100, na = 2000) {
  g  <- (seq_len(nx) - 0.5) / nx
  ag <- (seq_len(na) - 0.5) / na
  X  <- expand.grid(x1 = g, x2 = g)
  sapply(deltas, function(d) {
    p0 <- p0_true(X$x1)
    num <- den <- numeric(nrow(X))
    c0 <- if (d > 0) 1 else 0                           # scale exp(delta a) by exp(-delta c0)
    for (j in seq_len(nrow(X))) {
      f  <- f_pos(ag, X$x2[j]) / na
      ew <- f * exp(d * (ag - c0))
      den[j] <- sum(ew)
      num[j] <- sum(ew * mu_true(X$x1[j], X$x2[j], ag))
    }
    s  <- exp(-d * c0)                                  # same scaling for the atom
    mean((p0 * s * mu_true(X$x1, X$x2, 0) + (1 - p0) * num) /
         (p0 * s + (1 - p0) * den))
  })
}

oracle_law <- function(a_tr, x_tr, x_va, G = 200) {
  ag <- (seq_len(G) - 0.5) / G
  W  <- t(sapply(x_va$x2, function(v) { f <- f_pos(ag, v); f / sum(f) }))
  list(p0 = p0_true(x_va$x1), agrid = matrix(ag, nrow(x_va), G, byrow = TRUE), W = W,
       da = 1 / G)
}

one_rep <- function(n, deltas) {
  d <- sim_data(n)
  folds <- sample(rep(1:5, length.out = n))
  out <- rbind(
    data.frame(estimator = "regression",
               tilt_regression(d$y, d$a, d$x, deltas, folds)),
    data.frame(estimator = "mixed",
               tilt_grid(d$y, d$a, d$x, deltas, folds, law = fit_kernel_law)),
    data.frame(estimator = "paper",
               tilt_grid(d$y, d$a, d$x, deltas, folds, law = function(...)
                 fit_kernel_law(..., atom = FALSE, reflect = FALSE))),
    data.frame(estimator = "oracle",
               tilt_grid(d$y, d$a, d$x, deltas, folds, law = oracle_law)))
  stopifnot(all(abs(out$est[out$delta == 0] - mean(d$y)) < 1e-8))
  out$n <- n
  out
}
Show the runner
library(parallel)
# About 40 minutes for n = 1000 and 95 for n = 4000 on six cores, so the chunk
# reads the saved results when they exist.
if (!file.exists("incremental-effects-sim.rds")) {
  RNGkind("L'Ecuyer-CMRG"); set.seed(20261005)
  deltas <- c(-10, -5, -2, 0, 2, 5, 10, 25)
  truth  <- data.frame(delta = deltas, truth = true_psi(deltas))
  res <- list()
  for (n in c(1000, 4000)) {
    reps <- if (n == 1000) 200 else 100
    t0 <- Sys.time()
    out <- mclapply(seq_len(reps), function(r) {
      o <- try(one_rep(n, deltas)); if (!inherits(o, "try-error")) o$rep <- r; o
    }, mc.cores = 6, mc.set.seed = TRUE)
    bad <- vapply(out, inherits, logical(1), "try-error")
    if (any(bad)) message("n=", n, ": ", sum(bad), " failed reps: ", out[bad][[1]])
    res[[as.character(n)]] <- do.call(rbind, out[!bad])
    message("n=", n, " done in ", format(Sys.time() - t0))
    saveRDS(list(truth = truth, sims = do.call(rbind, res)), "incremental-effects-sim.rds")
  }
}
sim <- readRDS("incremental-effects-sim.rds")
Table 36.1: Bias and coverage of nominal 95% intervals for \(\psi(\delta)\). All three estimators use Equation 36.3 with the same outcome forest and differ only in the dose distribution \(\pi\): the known one used to generate the data (the oracle), ours (zeros modelled separately), or the paper’s (zeros smoothed into the density).
\(n\) \(\delta\) Known \(\pi\): bias Known \(\pi\): cover Ours: bias Ours: cover Paper’s: bias Paper’s: cover
1000 -5 -0.004 0.96 -0.116 0.68 -0.514 0.00
1000 -2 -0.002 0.93 -0.070 0.76 -0.158 0.34
1000 2 0.000 0.96 0.055 0.84 0.038 0.90
1000 10 0.002 0.96 0.046 0.96 0.053 0.96
4000 -5 0.000 0.94 -0.088 0.30 -0.423 0.00
4000 -2 0.001 0.95 -0.057 0.49 -0.141 0.00
4000 2 -0.001 0.94 0.044 0.59 0.032 0.65
4000 10 -0.003 0.94 0.004 0.96 0.010 0.94

With the true dose distribution the estimator is unbiased and covers at about 95% at every tilt, so Equation 36.3 and the one-step estimator are right. With our estimated distribution the bias at \(\delta = -5\) falls only from -0.116 to -0.088 when \(n\) quadruples, while the standard deviation halves, so coverage falls from 0.68 to 0.3. The reason is that the remainder contains the squared error of the density estimate (Schindl, Shen, and Kennedy 2026, Theorem 3), so a good outcome model does not protect us and the density has to be estimated well at every dose. Smoothing the zeros into the density, as the paper’s code does, is worse: at negative tilts its coverage is close to zero at both sample sizes. The density-free regression version of the previous section, which we also ran, was unstable at large positive tilts, as the authors reported.

36.6 Political ads and campaign contributions

The application follows Urban and Niebler (2014), with data from Fong, Hazlett, and Imai (2018) as distributed in the authors’ repository. The units are 16,265 ZIP codes in states that were not competitive in the 2008 presidential election. Media markets cross state lines, so some of these ZIP codes received ads aimed at a neighbouring competitive state. The dose is \(\log(\text{ads} + 1)\). The outcome is the ZIP code’s total contributions to the two presidential campaigns, \(C\), in thousands of dollars, entered as \(\log(C + 1)\). Thirty-six percent of ZIP codes gave nothing and the median gave $750. It is a total, not an amount per person, which is one reason log population is among the eight covariates, which are those of the paper. Two facts about the dose shape the analysis. Twelve percent of ZIP codes have no ads, and none has between about 3.6 and 5.0 log ads. And ads are bought by media market, so every ZIP code in one of the 138 markets has the same dose. The dose takes only 73 distinct values. The paper treats the ZIP codes as independent. We cross-fit with folds made of whole markets and report standard errors clustered by market next to the iid ones.

Code
e <- new.env(); load("FECForCEM.RData", envir = e); fec <- e$x
y <- log(fec$Cont + 1)
a <- log(fec$TotAds + 1)
X <- model.matrix(~ -1 + log(TotalPop) + PercentOver65 + log(Inc + 1) + PercentHispanic +
                    PercentBlack + density + per_collegegrads + CanCommute, data = fec)
colnames(X) <- make.names(colnames(X))
market <- fec$DMACode
set.seed(20261005)
mk <- unique(market)
folds <- sample(rep(1:5, length.out = length(mk)))[match(market, mk)]
if (!file.exists("incremental-effects-app.rds")) {
  deltas <- seq(-2.5, 5, by = 0.05)
  mixed <- tilt_grid(y, a, X, deltas, folds, cluster = market, threads = 6,
                     law = function(...) fit_kernel_law(..., D = 100, threads = 6))
  paper <- tilt_grid(y, a, X, deltas, folds, cluster = market, threads = 6,
                     law = function(...) fit_kernel_law(..., atom = FALSE, reflect = FALSE,
                                                        D = 100, threads = 6))
  stopifnot(abs(mixed$est[mixed$delta == 0] - mean(y)) < 1e-8,
            abs(paper$est[paper$delta == 0] - mean(y)) < 1e-8)
  apos <- a[a > 0]
  delta_dr <- length(y)^(1/3) / diff(range(apos))
  a1s <- c(1, 2, 3, 5.5, 6.5, 7.5, 8.5, 9.5)
  dr <- reflect_grid(y, a, X, a1s, delta_dr, folds, cluster = market, threads = 6,
                     law = function(...) fit_kernel_law(..., D = 100, threads = 6))
  saveRDS(list(mixed = mixed, paper = paper, dr = dr, delta_dr = delta_dr, ybar = mean(y)),
          "incremental-effects-app.rds")
}
app <- readRDS("incremental-effects-app.rds")
Figure 36.1: Estimated incremental effect of political ads on log contributions (top) and the implied change in the mean dose (bottom), with the zeros modelled separately (ours) and smoothed into the density (the paper’s). Bands are 95% intervals clustered by media market.

The check at zero holds: \(\hat\psi(0) =\) 1.2431, the sample mean of log contributions. The first thing the bottom panel shows is how strong these tilts are. The dose has variance 10.8 across ZIP codes, so \(\delta = 0.05\) already moves the mean dose by 0.48 log ads, and the paper’s largest tilt, \(\delta = 5\), moves it by 5.51, which puts nearly every ZIP code at the largest ad counts. The range of \(\delta\) the paper plots, from \(-2.5\) to \(5\), runs from almost no ads to the maximum.

The estimated curve rises slightly from 1.243 to a peak of 1.25 near \(\delta =\) 0.15, then falls to 0.745 at \(\delta = 5\). Negative tilts lower it to 1.045 at \(\delta = -2.5\). For positive tilts the two versions agree, because the zeros get little weight there. For negative tilts the paper’s version gives lower values, 0.758 at \(\delta = -2.5\), which is the same direction as its bias in the simulation.

The standard errors clustered by market are about ten times the iid ones: 0.12 against 0.012 at \(\delta = 0\). Ads vary across 138 markets, and the iid errors treat 16,265 ZIP codes as independent doses. With intervals of about \(\pm 0.24\), moderate tilts cannot be told apart from no tilt, and the simulation warns that even these intervals are too narrow at moderate \(\delta\). We read the curve as descriptive.

This does not match the paper’s application. It describes its results as average individual contributions rising from about $2.00 at \(\delta = 0\) to $2.20 at \(\delta = 5\), with most of the gain below \(\delta = 1\). The outcome is neither individual nor in dollars: it is the log of ZIP-level totals in thousands of dollars. Undoing the log at \(\delta = 0\) gives \(e^{\hat\psi(0)} - 1 =\) 2.47 thousand dollars per ZIP code, and that is a geometric-type average of totals, not a mean contribution. The missing normalisation of \(\hat\pi\) in their code does not account for the difference either: run on a subsample of the data, their code puts \(\hat\psi(0)\) within 0.01 of the sample mean. We could not find how the dollar figures were computed.

36.7 Shift and tilt on the same ZIP codes

We now estimate shifts with lmtp on the same data: the same covariates, a ranger learner for both nuisances, cross-fitting and standard errors by market. Each unit’s dose moves by \(s = \pm 0.5\) log ads when the shifted dose stays inside the observed range and is left alone otherwise. For each shift we take the tilt whose implied change in the mean dose is the same, read off the fine grid of \(\delta\) above, so the two interventions move the average dose by the same amount.

Code
# Shift interventions on the same ZIP codes with lmtp: move each unit's dose by
# s log ads when the shifted dose stays inside the observed range, and leave it
# unchanged otherwise. Same covariates, a ranger learner for both nuisances,
# cross-fitting and standard errors by media market.
library(lmtp); library(SuperLearner)
SL.ranger6 <- function(...) SL.ranger(..., num.trees = 500, num.threads = 6)
feasible_shift <- function(s, lo, hi) function(data, trt) {
  a <- data[[trt]]
  ifelse(a + s >= lo & a + s <= hi, a + s, a)
}
fec_df <- data.frame(X, a = a, y = y, market = market)
if (!file.exists("incremental-effects-lmtp.rds")) {
  shifts <- c(-0.5, 0.5)
  lmtp_fits <- lapply(shifts, function(s) {
    f <- lmtp_sdr(fec_df, trt = "a", outcome = "y", baseline = colnames(X),
                  shift = feasible_shift(s, min(a), max(a)), mtp = TRUE,
                  outcome_type = "continuous", id = "market",
                  learners_outcome = "SL.ranger6", learners_trt = "SL.ranger6", folds = 5)
    d <- feasible_shift(s, min(a), max(a))(fec_df, "a")
    data.frame(s = s, est = f$estimate@x, se = f$estimate@std_error,
               mean_shift = mean(d - a), share_moved = mean(d != a))
  })
  lmtp_res <- do.call(rbind, lmtp_fits)
  saveRDS(lmtp_res, "incremental-effects-lmtp.rds")
}
lmtp_res <- readRDS("incremental-effects-lmtp.rds")
Shift (lmtp) and tilt with the same change in the mean dose. Standard errors clustered by market; the tilt estimate is interpolated on the grid of \(\delta\).
\(s\) Share moved Mean change in dose Shift estimate SE Matched \(\delta\) Tilt estimate SE
-0.5 0.879 -0.439 1.241 0.202 -0.047 1.238 0.118
0.5 0.975 0.488 1.251 0.207 0.051 1.247 0.122

For a change of half a log ad in the average dose, the two estimates are almost the same: 1.251 for the shift and 1.247 for the tilt when the mean dose rises, and 1.241 against 1.238 when it falls. Both are within a few thousandths of \(\bar Y =\) 1.243, and the differences are far inside the standard errors. Small changes in ads move contributions very little under either intervention.

They differ in who moves. The shift moves everyone it can by the same amount: 97.5% of ZIP codes for the upward shift, and 87.9% for the downward one, since the ZIP codes with no ads cannot go lower. The tilt with the same mean moves units in proportion to the spread of their dose given covariates and never sends anyone to a dose they could not receive. The shift also sends every ZIP code it moves to an ad count that no market had. The dose takes only 73 values, and none of the shifted doses, 14,289 downward and 15,859 upward, equals one of them. Staying inside the observed range therefore does not make a shifted dose supported. The data say nothing directly about outcomes at those doses, and lmtp’s outcome model and density-ratio classifier fill the gaps by smoothing between the observed doses. The tilt, by contrast, only reweights doses that occur. Its standard errors here are larger, 0.207 against 0.122.

So the two estimates are close, but they do not rest on the same evidence. The tilt estimate is identified from the doses the markets received. The shift estimate depends on how the models extrapolate to doses no market received, so the comparison is a check of that extrapolation and not a second identified estimate that agrees with the first. Under both, a small change in ads moves contributions very little. The choice of intervention matters for what the estimate means and for what the data must support. A shift asks what would happen if every ZIP code saw half a log ad more. It is stated in dose units, and it needs the shifted doses to be ones that comparable ZIP codes actually received. A tilt asks what would happen if higher ad counts became more likely. It never needs an impossible dose, but its \(\delta\) has to be translated into a change in the dose, as the bottom panel of Figure 36.1 does. We would use a shift when the shifted doses are plausible, and a tilt when the edges of the support, gaps in it, or a pile of zeros rule shifts out. Either way the intervals depend on estimating the dose distribution well. Our simulation shows this for the tilt; we have not checked it for lmtp.

36.8 Dose-response by a reflected tilt

To reach an interior dose \(a'\), tilt upward below \(a'\) and downward above it. With \(\omega(x) = P(A \le a' \mid X = x)\), the reflected tilt is the following [Schindl, Shen, and Kennedy (2026), Section 6; Theorem 5 gives its influence function]

\[ r_\delta(a \mid x) = \omega(x)\, \frac{e^{\delta a}\pi(a\mid x)\, 1(a \le a')}{\int_{t \le a'} e^{\delta t}\pi(t\mid x)\, dt} + \{1 - \omega(x)\}\, \frac{e^{-\delta a}\pi(a\mid x)\, 1(a > a')}{\int_{t > a'} e^{-\delta t}\pi(t\mid x)\, dt}, \tag{36.4}\]

and \(\psi_R(\delta, a')\) averages \(\mu\) over it. As \(\delta \to \infty\) it converges to \(E(Y^{a'})\). If \(\mu\) is Lipschitz in the dose, the estimate is within \(O_P(1/\delta + \sqrt{\delta/n})\) of \(E(Y^{a'})\) (their Theorem 6), so \(\delta\) of order \(n^{1/3}\) gives the usual \(n^{-1/3}\) rate. The two sides of \(a'\) get the weights \(\omega\) and \(1 - \omega\), which makes the tilt an asymmetric exponential kernel. Its bias is first order in \(1/\delta\), which is why the result stops at Lipschitz smoothness. The rate is stated for a dose on \([0, 1]\), so we set \(\delta = n^{1/3}\) on that scale, which is \(\delta =\) 2.72 per log ad here, and evaluate the curve away from the hole, where weak positivity fails.

Two qualifications apply to the figure below. First, the dose takes only 73 values, and none of the eight targets \(a'\) is one of them; the nearest observed doses are 0.008 to 0.099 log ads away. Theorem 6 assumes a positive conditional density of the dose near \(a'\), which a discrete dose does not have. As \(\delta\) grows, the tilt applied to the true dose distribution piles onto the observed doses next to \(a'\), not onto \(a'\) itself. Our estimated dose density is smooth, so it puts mass between the observed doses, but the data cannot tell us the outcome there. Second, the \(n^{1/3}\) rule is derived for independent units. We use \(n\) = 16,265 ZIP codes, but the dose is set by 138 markets, and with \(n = 138\) the same rule gives a \(\delta\) about five times smaller. We therefore read the curve as a smoothed, model-dependent description of how contributions vary with ads, not as estimates of \(E(Y^{a'})\).

Figure 36.2: Smoothed, model-dependent description of log contributions against log ads by the reflected tilt, with 95% intervals clustered by market. The curve is not evaluated in the hole of the dose distribution between about 3.6 and 5.0.

The estimated curve is flat within its noise. It rises from 1.244 at one log ad to 1.366 at 5.5 and falls to 1.108 at 9.5, with clustered standard errors between 0.13 and 0.2. The dashed line is the sample mean. The same caveats apply as before: intervals that understate uncertainty when the density is estimated, a bias of order \(1/\delta\), and targets that lie between the observed doses.

36.9 Summary

An incremental effect tilts each unit’s dose distribution toward higher or lower doses, \(q_\delta(a \mid x) \propto e^{\delta a}\pi(a \mid x)\), and asks for the mean outcome under the tilted distribution. Doses a unit could never receive stay impossible, so the effect is identified without positivity, which a shift of the dose needs. The price is that \(\delta\) is not a dose: it changes the mean dose by about \(\delta \operatorname{var}(A \mid X)\). Its efficient influence function weights residuals by \(e^{\delta A}/E(e^{\delta A} \mid X)\). Under weak positivity at the top of the support, the best attainable error is of order \(\sqrt{\delta/n}\), and the cross-fitted one-step estimator attains it when the nuisances are good enough.

“Good enough” is the catch. In our simulation the one-step estimator is unbiased and covers at 95% when the dose distribution is known. With the distribution estimated by the paper’s kernel regression, made to integrate to one, reflected at the edges and given a separate probability for zero doses, the bias falls more slowly than the standard error, and coverage at moderate tilts gets worse as \(n\) grows. The remainder contains the squared error of the density estimate, so the conditional density has to be estimated well, uniformly over doses. Smoothing the zeros into the density biases negative tilts badly, and the regression version without a density is unstable.

In the political-ads data the tilts are strong, standard errors must be clustered by the 138 media markets that set the dose, and the curve is flat within those errors. Shifting the dose by half a log ad with lmtp gives almost the same estimate as a tilt with the same change in the mean dose. The shifted doses are values no market received, so the shift estimate rests on the models’ smoothing between observed doses. The reflected-tilt dose-response curve rests on the same smoothing, because its targets also lie between the 73 observed doses.


Systematic treatment: R · Julia.