Function to estimate the average treatment effect with the sample being balanced by GEL.
ATEgel(g, balm, w=NULL, y=NULL, treat=NULL, tet0=NULL,momType=c("bal","balSample","ATT"),
popMom = NULL, family=c("linear","logit", "probit"),
type = c("EL", "ET", "CUE", "ETEL", "HD", "ETHD"),
tol_lam = 1e-9, tol_obj = 1e-9, tol_mom = 1e-9, maxiterlam = 100,
optfct = c("optim", "nlminb"),
optlam = c("nlminb", "optim", "iter", "Wu"), data=NULL,
Lambdacontrol = list(),
model = TRUE, X = FALSE, Y = FALSE, ...)
checkConv(obj, tolConv=1e-4, verbose=TRUE)
A formula as y~z
, where codey is the response and
z
the treatment indicator. If there is more than one
treatment, more indicators can be added or z
can be set as a
factor. It can also be of the form
g(theta, y, z)
for non-linear models. It is however, not
implemented yet.
Object of class "ategel"
produced y ATEgel
A formula for the moments to be balanced between the treated and control groups (see details)
The response variable when g
is a function. Not
implemented yet
The treatment indicator when g
is a function. Not
implemented yet
A formula to add covariates to the main regression. When
NULL
, the default value, the main regression only include
treatment indicators.
A \(3 \times 1\) vector of starting values. If not provided, they are obtained using an OLS regression
How the moments of the covariates should be balanced. By default, it is simply balanced without restriction. Alternatively, moments can be set equal to the sample moments of the whole sample, or to the sample moments of the treated group. The later will produce the average treatment effect of the treated (ATT)
A vector of population moments to use for balancing. It can be used of those moments are available from a census, for example. When available, it greatly improves efficiency.
By default, the outcome is linearly related to the treatment indicators. If the outcome is binary, it is possible to use the estimating equations of either the logit or probit model.
"EL" for empirical likelihood, "ET" for exponential tilting, "CUE" for continuous updated estimator, "ETEL" for exponentially tilted empirical likelihood of Schennach(2007), "HD" for Hellinger Distance of Kitamura-Otsu-Evdokimov (2013), and "ETHD" for the exponentially tilted Hellinger distance of Antoine-Dovonon (2015).
Tolerance for \(\lambda\) between two iterations. The algorithm stops when \(\|\lambda_i -\lambda_{i-1}\|\) reaches tol_lamb
(see getLamb
)
The algorithm to compute \(\lambda\) stops if there is no convergence after "maxiterlam" iterations (see getLamb
).
Tolerance for the gradiant of the objective function to compute \(\lambda\) (see getLamb
).
Algorithm used for the parameter estimates
It is the tolerance for the moment condition \(\sum_{t=1}^n p_t g(\theta(x_t)=0\), where \(p_t=\frac{1}{n}D\rho(<g_t,\lambda>)\) is the implied probability. It adds a penalty if the solution diverges from its goal.
Algorithm used to solve for the lagrange multiplier in
getLamb
. The algorithm Wu is only for type="EL"
.
A data.frame or a matrix with column names (Optional).
Controls for the optimization of the vector of Lagrange multipliers used by either optim
, nlminb
or constrOptim
logicals. If TRUE
the corresponding components of the fit (the model frame, the model matrix, the response) are returned if g is a formula.
If TRUE, a summary of the convergence is printed
The tolerance for comparing moments between groups
'gel' returns an object of 'class' '"ategel"'
The functions 'summary' is used to obtain and print a summary of the results.
The object of class "ategel" is a list containing the same elements
contained in objects of class gel
.
We want to estimate the model \(Y_t = \theta_1 + \theta_2 treat +
\epsilon_t\), where \(\theta_2\) is the treatment effect. GEL is
used to balance the sample based on the argument x
above.
For example, if we want the sample mean of x1
and x2
to be
balanced between the treated and control, we set x
to
~x1+x2
. If we want the sample mean of x1
, x2
,
x1*x2
, x1^2
and x2^2
, we set x
to
~x1*x2 + I(x1^2) + I(x2^2)
.
Lee, Seojeong (2016), Asymptotic refinements of misspecified-robust bootstrap for GEL estimators, Journal of Econometrics, 192, 86--104.
Schennach, Susanne, M. (2007), Point Estimation with Exponentially Tilted Empirical Likelihood. Econometrica, 35, 634-672.
Wu, C. (2005), Algorithms and R codes for the pseudo empirical likelihood method in survey sampling. Survey Methodology, 31(2), page 239.
Chausse, P. (2010), Computing Generalized Method of Moments and Generalized Empirical Likelihood with R. Journal of Statistical Software, 34(11), 1--35. URL http://www.jstatsoft.org/v34/i11/.
Chausse, P and Luta, G. (2017) Estimating the Average Treatment Effect in Quasi-Experimental Studies using the Generalized Empirical Likelihood, Work in progress.
# NOT RUN {
data(nsw)
# Scale income
nsw$re78 <- nsw$re78/1000
nsw$re75 <- nsw$re75/1000
res <- ATEgel(re78~treat, ~age+ed+black+hisp+married+nodeg+re75,
data=nsw,type="ET")
summary(res)
chk <- checkConv(res)
res2 <- ATEgel(re78~treat, ~age+ed+black+hisp+married+nodeg+re75,
data=nsw,type="ET", momType="balSample")
summary(res2)
chk2 <- checkConv(res2)
# }
Run the code above in your browser using DataLab