Continuous treatments and regression estimands
There’s an easy but false intuition that if you randomly assign a continuous treatment, a simple regression of the outcome on the treatment will get you an estimate of some type of average treatment effect.
If by the average treatment effect you mean something like “the change in
In the below example the average effect (under both above definitions) is +1. But regression returns an estimate of -1.
So, wildly different.
Estimands
Yitzhaki (1996) describes the estimand that is targeted by the regression of
Below is an implementation of the version of the estimand provided in Angrist and Krueger (1999) (equation (34), p 1312), which is good when
# weights function
<- function(x)
W sapply(unique(x) |> sort(), function(S)
mean(x[x >= S]) - mean(x[x < S])) * (mean(x >= S) * (1 - (
((mean(x >= S)
)))))
# estimand: assuming data at all values in integer range
<- function(x, f) {
yonx_estimand <- unique(x) |> sort()
xs <- ((f(xs) - f(lag(xs))) / (xs - lag(xs)))[-1]
ds <- W(x)[-1]/sum(W(x)[-1])
ws list(df = data.frame(local_effects=ds, weights = ws),
estimand = weighted.mean(ds, ws))
}
The example above is obviously an evil example but the issue arises more generally. In the below illustration there is a monotonic cubic function and we see much more weight on regions with small local effects.
# Illustration
<- function(x) x ^ 3
f <- -5:5
x <- f(x)
y
yonx_estimand(x, f)$df |> ggplot(aes(local_effects, weights)) + geom_point()
c(estimand = yonx_estimand(x, f)$estimand, estimate = (lm(y ~ x) |> coef())[2])
estimand estimate.x
17.8 17.8