Modified treatment policies

Modified

June 4, 2025

As we already discussed, a modified treatment policy is an intervention characterized by a dependence on the natural, or observed, value of treatment. Examples include:

Synthetic Neighborhood Community Violence Data

In some current work, we are interested in estimating the effect of decreasing the level of community violence (violent crime rate) on risk of preterm birth. Research suggests community violence may impact infant health through physiological responses to stress, worsening maternal mental health, and unhealthy coping behaviors. Community violence is a highly endogenous exposure, which, motivates the use of such a shift intervention.1

Problem 1

Write a shift function for a modified treatment policy where the natural value of neighborhood violence is decreased by 50%. Using the lmtp package, estimate the population mean effect of this intervention on preterm birth. Make sure to use the id argument to account for community level clustering in the estimation of standard errors. To save computation time, don’t use cross-fitting.

✅ Solution

d <- function(data, a) {
  data[[a]]*0.5
}

fit_mtp <- lmtp_tmle(
  data = crime, 
  trt = A, 
  outcome = Y, 
  baseline = W,
  id = id,
  shift = d, 
  mtp = TRUE,
  folds = 1, 
  learners_trt = learners, 
  learners_outcome = learners
)

Did you get this error?

Warning: Detected decimalish `trt` values and `mtp = FALSE`. Consider setting `mtp =
TRUE` if getting errors.
Loading required package: nnls
Error: object 'fit' not found

Make sure to set mtp = TRUE if you’re intervention is a modified treatment policy!

Problem 2

Let’s compare the effect of the intervention on reducing neighborhood violence on preterm birth to the observed preterm birth rate. We need to take into account that we’re using the sample average of the observed preterm birth rate for this contrast. The EIF for a sample mean of a random variable is

\[ Y - \E[Y]\text{.} \]

Recall that under the hood, lmtp returns estimates as ife objects from the ife package. An ife object is an S7 class for estimates based on influence functions which allows for arithmetic operations between influence function based estimates. This makes it really easy to automatically calculate standard errors and confidence intervals. Let’s make an ife object for the sample average of the observed preterm birth rate.

Contrast the effect of the intervention on preterm birth with the observed preterm birth rate.

✅ Solution

fit_mtp$estimate - ife_preterm_birth

With lmtp we found that under a hypothetical intervention that reduces neighborhood violence by 50%, preterm birth would decrease by approximately 4 percentage points.

References

Dı́az, Iván, Nicholas Williams, Katherine L Hoffman, and Edward J Schenck. 2023. “Nonparametric Causal Effects Based on Longitudinal Modified Treatment Policies.” Journal of the American Statistical Association 118 (542): 846–57.
Haneuse, Sebastian, and Andrea Rotnitzky. 2013. “Estimation of the Effect of Interventions That Modify the Received Treatment.” Statistics in Medicine 32 (30): 5260–77.

Footnotes

  1. Thank you to Chris Dharma, who simulated this data!↩︎