treatment effect in instrumental variables regression - Cross Validated most recent 30 from stats.stackexchange.com 2019-07-16T06:59:28Z https://stats.stackexchange.com/feeds/question/262421 http://www.creativecommons.org/licenses/by-sa/3.0/rdf https://stats.stackexchange.com/q/262421 1 treatment effect in instrumental variables regression Eric Green https://stats.stackexchange.com/users/23607 2017-02-17T02:10:13Z 2017-08-17T12:29:00Z <p>I'm designing a randomized encouragement trial in which half of the sample will be randomly assigned to receive a special invitation to try a new intervention. This design will likely result in two-sided non-compliance with respect to random assignment:</p> <ol> <li><p>Everyone randomized to the encouragement arm will receive a special invitation to try the intervention, but only a subset of people in this group will take up this offer.</p></li> <li><p>People randomized to the control arm will NOT receive a special invitation to try the intervention, but some will learn about it through other channels and try it out on their own.</p></li> </ol> <p>Encouragement designs account for this non-compliance by estimating the local average treatment effect (LATE). LATE is the effect of the intervention on 'compliers'—those who tried the intervention because they were randomly encouraged to do so but would not have tried if not encouraged. </p> <p>I simulated a basic dataset that mimics the planned study, and have a question about interpreting the treatment effect.</p> <pre><code># setup library(dplyr) library(arm) library(AER) library(ivpack) library(stargazer) n &lt;- 134 # https://rpubs.com/wsundstrom/t_ivreg # function to calculate corrected SEs for OLS regression cse = function(reg) { rob = sqrt(diag(vcovHC(reg, type = "HC1"))) return(rob) } # corrected SEs for IV regressions... slight difference from S&amp;W method ivse = function(reg) { rob = robust.se(reg)[,2] return(rob) } # create dataframe dat &lt;- data.frame(partID=seq(1, n, 1), trt=c(rep(0, n/2), rep(1, n/2))) # set proportion use useT &lt;- .8 # treatment group (encouraged) useC &lt;- .2 # control group (not encouraged) # create use variable set.seed(493) dat$use &lt;- c(rbinom(n/2, 1, useC), rbinom(n/2, 1, useT)) # create covariate # http://stackoverflow.com/questions/42147053/simulate-continuous-variable-that-is-correlated-to-existing-binary-variable x1 &lt;- dat$use # fixed given data rho &lt;- 0.1 # desired correlation = cos(angle) theta &lt;- acos(rho) # corresponding angle x2 &lt;- rnorm(n, 2, 0.5) # new random data X &lt;- cbind(x1, x2) # matrix Xctr &lt;- scale(X, center=TRUE, scale=FALSE) # centered columns (mean 0) Id &lt;- diag(n) # identity matrix Q &lt;- qr.Q(qr(Xctr[ , 1, drop=FALSE])) # QR-decomposition, just matrix Q P &lt;- tcrossprod(Q) # = Q Q' # projection onto space defined by x1 x2o &lt;- (Id-P) %*% Xctr[ , 2] # x2ctr made orthogonal to x1ctr Xc2 &lt;- cbind(Xctr[ , 1], x2o) # bind to matrix Y &lt;- Xc2 %*% diag(1/sqrt(colSums(Xc2^2))) # scale columns to length 1 x &lt;- Y[ , 2] + (1 / tan(theta)) * Y[ , 1] # final new vector dat$age &lt;- (1 + x) * 25 cor(dat$use, dat$age) dat$age &lt;- round(dat$age, 0) # outcome outT &lt;- .35 outC &lt;- .05 dat$y &lt;- c(rbinom(n/2, 1, outC), rbinom(n/2, 1, outT)) # IV Regression ivR = ivreg(y ~ use + rescale(age) | rescale(age) + trt , data = dat) stargazer(ivR, se=list(ivse(ivR)), title="IV Regression", type="text", df=FALSE, digits=5, ci=TRUE) </code></pre> <p>The coefficient on <code>use</code> is 0.43. This is the effect on the 'compliers'. The outcome <code>y</code> is binary. I want to be able to say that the intervention increased <code>y</code> by 43% points from a to b. </p> <p>How do I get a? The proportion among the control group is 0.03, but this includes compliers and <code>never-takers</code>. </p> https://stats.stackexchange.com/questions/262421/-/298319#298319 1 Answer by eric_kernfeld for treatment effect in instrumental variables regression eric_kernfeld https://stats.stackexchange.com/users/86176 2017-08-16T23:44:49Z 2017-08-16T23:44:49Z <p>I'm gonna need some help here, but here's one approach to an answer.</p> <p>The parameter you want is not necessarily identifiable from your dataset.</p> <p>Consider the following dataset, where <code>out</code> is the outcome, <code>trt</code> is the encouragement, <code>use</code> is the actual intervention, <code>num</code> says how many people fell into that pattern of encouragement/intervention, and <code>comp</code> is how we might categorize the patients in that group using the compliance classes outlined in <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4201653/" rel="nofollow noreferrer">this</a> review.</p> <pre><code>id out use trt comp 1 1 0 0 never_taker OR complier 2 1 1 1 complier 3 0 0 0 complier 4 1 1 0 always_taker </code></pre> <p>You'll observe the same data no matter whether participant 1 is a never-taker or a complier. But, participant 1's status affects the parameter you seek. If they are a complier, that pushes the untreated complier outcome probability from 0 to 1/2.</p> https://stats.stackexchange.com/questions/262421/-/298329#298329 1 Answer by Martijn Weterings for treatment effect in instrumental variables regression Martijn Weterings https://stats.stackexchange.com/users/164061 2017-08-17T01:21:10Z 2017-08-17T12:29:00Z <p>You've got </p> <p>E(y $\vert$ encouraged) = $\tfrac{18}{67}$</p> <p>E(y $\vert$ !encouraged) = $\tfrac{2}{67}$</p> <p>E(use $\vert$ encouraged) = $\tfrac{53}{67}$</p> <p>E(use $\vert$ !encouraged) = $\tfrac{16}{67}$</p> <p>Equation (2) from the <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4201653/" rel="nofollow noreferrer">source from other Eric</a> in intuitive words:</p> <ul> <li>the total effect is the 53 that 'use' resulting in 18 'y'.</li> <li>substract from that the 16 that normally (without encouragement) 'use' and result in 2 'y'</li> <li>Then the causal effect of 'use', the 37 extra 'use' that stems from the encouragement, is 16 extra 'y', and "therefore" the causal effect is</li> </ul> <p>$\frac{E(y\vert e)-E(y\vert !e)}{E(use\vert e)-E(use\vert !e)} = \frac{16}{37} = 0.43...$</p> <p>This analysis is without the age parameter since it does not correlate anyway (then we do not need the regression to obtain the estimated values). For the model with the covariates (if you have a serious effect of age in the real data) you will need some regression model to obtain those estimated values. I suggest that you use a reasonable model, restricted to values between 0 and 1, such that the predicted values make at least some sense.</p> <hr> <p>If you wish something like: "I want to be able to say that..." </p> <p>... - <strong>the intervention</strong> - <em>increased</em> - <strong>y</strong> - by 43% points - <em>from</em> a to b. </p> <p>What the double regression does is more something like (using the same structure):</p> <p>... - <strong>the change in intervention use that is due to the encouragement</strong> (from 16 to 53) - <em>increased</em> - <strong>y</strong> - with a coefficient of 0.43 - <em>from</em> 2 to 18"</p> <p>The encouragement increases the use and the use increases y. The 0.43 is not related to the relative increase of y (from a to b) but to to the coefficient that relates the change of 'use' with the change of 'y'.</p>