Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function provides instrumental variable estimation of treatment effects when both the endogenous treatment and its instrument are binary. Applicable to both binary and continuous outcomes.
1 2 |
formula |
specification of the outcome model in the form like either |
treatment |
A vector containing the binary treatment. |
instrument |
A vector containing the binary instrument for the endogenous treatment. |
data |
an optional data frame. If unspecified, the data will be taken from the working environment. |
method |
the estimation method to be used. The default is “LS", standing for least squares. “ML", standing for maximum likelihood, is an alternative. |
AME |
whether average marginal effects (AME) should be reported. The default is FALSE, in which case marginal effects at the means (MEM) are reported. |
optimizer |
the optimization algorithm for the ML method. It should be one of “Nelder-Mead", “BFGS", “CG", “L-BFGS-B", “SANN", or “Brent". See |
zProb |
a vector containing the probability of receiving the treatment inducement (i.e., instrument = 1) that have been estimated by semiparametrical methods. |
larf
is the high-level interface to the work-horse function larf.fit
. A set of standard methods (including print
, summary
, coef
, vcov
, fitted
, resid
, predict
) can be used to extract the corresponding information from a larf
object.
The function provides instrumental variable estimation of treatment effects when both the endogenous treatment and its instrument (i.e., the treatment inducement) are binary. The method (Abadie, 2003) involves two steps. First, pseudo-weights are constructed from the probability of receiving the treatment inducement. By default the function estimates the probability by a Probit regression. But it also allows users to employ the probability that has been estimated by semiparametric methods. Second, the pseudo-weights are used to estimate the local average response function of the outcome conditional on the treatment and covariates. The function provides both least squares and maximum likelihood estimates of the conditional treatment effects.
coefficients |
Estimated coefficients. |
SE |
Standard errors of the estimated coefficients. |
MargEff |
Estimated marginal effects, available only for binary outcomes. |
MargStdErr |
Standard errors of the estimated marginal effects, available only for binary outcomes. |
vcov |
Variance covariance matrix of the estimated coefficients. |
fitted.values |
Predicted outcomes based on the estimated model. They are probabilities when the outcome is binary. |
We derived part of the code from the Matlab code written by Professor Alberto Abadie, available at http://www.hks.harvard.edu/fs/aabadie/larf.html. We thank Onur Altindag and Behzad Kianian for helpful suggestions on improving the computation.
Weihua An, Departments of Sociology and Statistics, Indiana University Bloomington, weihuaan@indiana.edu.
Xuefu Wang, Department of Statistics, Indiana University Bloomington, wangxuef@umail.iu.edu.
Abadie, Alberto. 2003. "Semiparametric Instrumental Variable Estimation of Treatment Response Models." Journal of Econometrics 113: 231-263.
An, Weihua and Xuefu Wang. 2016. "LARF: Instrumental Variable Estimation of Causal Effects through Local Average Response Functions." Journal of Statistical Software 71(1): 1-13.
Zeileis, Achim and Yves Croissant. 2010. "Extended Model Formulas in R: Multiple Parts and Multiple Responses." Journal of Statistical Software 34(1): 1-13. http://www.jstatsoft.org/v34/i01/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data(c401k)
attach(c401k)
## Not run:
# Continuous outcome. Treatment effects of participation in 401(k)
# on net family financial assest
est1 <- larf(nettfa ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k)
summary(est1)
# Nonparametric estimates of the probability of
# receiving the treatment inducement
library(mgcv)
firstStep <- gam(e401k ~ s(inc) + s(age) + s(agesq) + marr + s(fsize),
data=c401k, family=binomial(link = "probit"))
zProb <- firstStep$fitted
est2<- larf(nettfa ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k, zProb = zProb)
summary(est2)
# Binary outcome. Treatment effects of participation in 401(k)
# on participation in IRA
est3 <- larf(pira ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k)
summary(est3)
## End(Not run)
|
Call:
larf(formula = nettfa ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k)
Estimate SE P
Treatment 9.4947 2.1582 0.0000
(Intercept) -7.6793 14.8525 0.6051
inc 1.0130 0.0908 0.0000
age -1.4790 0.8047 0.0661
agesq 0.0308 0.0099 0.0020
marr -7.4821 2.5607 0.0035
fsize -1.0573 0.6262 0.0913
Loading required package: nlme
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
Call:
larf(formula = nettfa ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k, zProb = zProb)
Estimate SE P
Treatment 10.8070 2.5298 0.0000
(Intercept) -16.7741 31.4524 0.5938
inc 0.9821 0.1080 0.0000
age -1.0412 1.5938 0.5136
agesq 0.0259 0.0183 0.1588
marr -6.6585 4.2016 0.1131
fsize -1.2314 1.5159 0.4167
Call:
larf(formula = pira ~ inc + age + agesq + marr + fsize, treatment = p401k,
instrument = e401k, data = c401k, AME = FALSE)
Estimate SE P MEM MEM-SE MEM-P
Treatment 0.0788 0.0501 0.1157 0.0254 0.0161 0.1144
(Intercept) -3.5598 0.4673 0.0000 -0.7428 0.0092 0.0000
inc 0.0202 0.0012 0.0000 0.0065 0.0004 0.0000
age 0.0801 0.0225 0.0004 0.0257 0.0072 0.0003
agesq -0.0005 0.0003 0.0351 -0.0002 0.0001 0.0342
marr 0.1292 0.0701 0.0654 0.0410 0.0219 0.0614
fsize -0.1268 0.0231 0.0000 -0.0407 0.0074 0.0000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.