We ran an experiment in which users could optionally watch a video. The video is intended to drive some other metric, $y$.
Because the intervention (video) was optional, choosing to watch the video is confounded by omitted variables (most probably being the kind of person to watch instructional videos). Since treatment was randomized, we can use it as an instrument to estimate the effect of watching the video on $y$.
Our data and analysis are shown below
library(tidyverse)
library(ivreg)
d <-data.frame(
treatment = c(0, 0, 1, 1, 1, 1),
clicked = c(0, 0, 0, 0, 1, 1),
y = c(0, 1, 0, 1, 0, 1),
n = c(3008L, 2075L, 2779L, 2038L, 145L, 74L)
) %>%
uncount(n)
mfit <- ivreg(y ~ clicked | treatment, data=d)
mfit
#>
#> Call:
#> ivreg(formula = y ~ clicked | treatment, data = d)
#>
#> Coefficients:
#> (Intercept) clicked
#> 0.4082 0.2566
The causal estimate of watching the video is 0.26. Because we typically report these effects on the relative scale, I need to know the estimated rate $y$ when clicks do not happen. The way I approached this was simply to use the predict
method on mfit
to get estimated rates when clicked=0,1
.
This results in $E[y] = 0.67$ for users who clicked, and $E[y]=0.41$ for users who did not click.
My colleague points out that the dat a do not support this interpretation. Examining users who only clicked on the video, the estimated rate of $y$ is 0.34
d %>%
filter(clicked==1) %>%
summarise(
mean(y)
)
mean(y)
1 0.3378995
Question
I believe I am wrong to have used the predict
method to estimate the rate of $y$ when clicked=0
. This is because to estimate that rate, I would need the unmeasured confounders. So while I can estimate the effect of the click onk $y$, I can not estimate $E[y\mid \mbox{clicked}]$.
Am I correct? If not, how can I reconcile the difference in estimated rates between the model and the data?
Edit
After some more thinking, i'm inclined to say it would be impossible to estimate the relative improvement for users who clicked.
The intercept in the ivreg
call is the same as the marginal mean of the control group. However, that estimate is comprised of an unknown proportion of compliers and non compliers.
Even in the case where we maybe knew the propotion of compliers, the estimated rate of $y$ for compliers is unknown because it could depend on unmeasured confounders. So we can't know the other term for our causal contrast, we can only know the LATE from using the instrument. Which is a fine answer, I just need to know for certain it isn't possible.
ivreg
call in light of the previous answer $\endgroup$