Last chance! 50% off unlimited learning
Sale ends in
An, Weihua and Xuefu Wang. 2013. ``LARF: Local Average Response Functions for Instrumental Variable Estimation of Treatment Effects." An R package available at CRAN. http://cran.r-project.org/web/packages/LARF/index.html.
larf(formula, treatment, instrument, data, method = "LS", AME = FALSE, optimizer = "Nelder-Mead", zProb = NULL)
y ~ x1 + x2
or y ~ X
where X
is a matrix containing all the covariates excluding the treatment.optim
in R for more detail.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.
larf.fit
, c401k
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)
Run the code above in your browser using DataLab