ATEgel: ATE with Generalized Empirical Likelihood estimation

View source: R/ategel.R

ATEgelR Documentation

ATE with Generalized Empirical Likelihood estimation

Description

Function to estimate the average treatment effect with the sample being balanced by GEL.

Usage

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", "RCUE"),
                   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, ...)

Arguments

g

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.

obj

Object of class "ategel" produced y ATEgel

balm

A formula for the moments to be balanced between the treated and control groups (see details)

y

The response variable when g is a function. Not implemented yet

treat

The treatment indicator when g is a function. Not implemented yet

w

A formula to add covariates to the main regression. When NULL, the default value, the main regression only include treatment indicators.

tet0

A 3 \times 1 vector of starting values. If not provided, they are obtained using an OLS regression

momType

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)

popMom

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.

family

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.

type

"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). "RCUE" is a restricted version of "CUE" in which the probabilities are bounded below by zero. In that case, an analytical Kuhn-Tucker method is used to find the solution.

tol_lam

Tolerance for \lambda between two iterations. The algorithm stops when \|\lambda_i -\lambda_{i-1}\| reaches tol_lamb (see getLamb)

maxiterlam

The algorithm to compute \lambda stops if there is no convergence after "maxiterlam" iterations (see getLamb).

tol_obj

Tolerance for the gradiant of the objective function to compute \lambda (see getLamb).

optfct

Algorithm used for the parameter estimates

tol_mom

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.

optlam

Algorithm used to solve for the lagrange multiplier in getLamb. The algorithm Wu is only for type="EL". The value of optlam is ignored for "CUE" because in that case, the analytical solution exists.

data

A data.frame or a matrix with column names (Optional).

Lambdacontrol

Controls for the optimization of the vector of Lagrange multipliers used by either optim, nlminb or constrOptim

model, X, Y

logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response) are returned if g is a formula.

verbose

If TRUE, a summary of the convergence is printed

tolConv

The tolerance for comparing moments between groups

...

More options to give to optim or nlminb. In checkConv, they are options passed to getImpProb.

Details

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).

Value

'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.

References

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 \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v034.i11")}.

Chausse, P. and Giurcanu, M. and Luta, G. (2021) Estimating the Average Causal Effect using Generalized Empirical Likelihood Methods, Work in progress.

Examples

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)


gmm documentation built on June 7, 2023, 6:05 p.m.

Related to ATEgel in gmm...