causalGEL {causalGel}R Documentation

Causal inference using balancing methods

Description

It fit a causality model using balancing based on GEL methods. It creates an object of class "causalGelfit".

Usage


causalGEL(g, balm, data, theta0=NULL,
          momType=c("ACE","ACT","ACC", "uncondBal","fixedMom"),
          popMom = NULL, rhoFct=NULL,ACTmom=1L, 
          gelType = c("EL", "ET", "EEL", "ETEL", "HD", "ETHD","REEL"),
          initTheta = c("gmm","theta0"), getVcov=FALSE,
          lambda0=NULL, cstLHS=NULL, cstRHS=NULL,
          lamSlv=NULL, coefSlv= c("optim","nlminb","constrOptim"),
          lControl=list(), tControl=list(), restrictLam=FALSE,
          orthoBases=FALSE)

Arguments

g

A formula that links the outcome variable to the treatment indicators.

balm

A formula or a matrix with balancing covariates

data

A data.frame or a matrix with column names.

theta0

A vector of starting values (optional). If not provided, the least squares method is use to generate them

momType

How the moments of the covariates should be balanced. By default, it is balanced using the sample mean of the covariates, which corresponds to the ACE. Alternatively, to the sample moments of the treated group (ACT), the control group (ACC), or to a known population mean. The option 'uncondBal' means that it is unconditionally balanced.

popMom

A vector of population moments to use for balancing. It can be used if those moments are available from a census, for example. When available, it greatly improves efficiency.

rhoFct

An optional function that return ρ(v). This is for users who want a GEL model that is not built in the package. The four arguments of the function must be "gmat", the matrix of moments, "lambda", the vector of Lagrange multipliers, "derive", which specify the order of derivative to return, and k a numeric scale factor required for time series and kernel smoothed moments.

ACTmom

When momType is set to 'ACT', that integer indicates which treated group to use to balance the covariates.

gelType

"EL" for empirical likelihood, "ET" for exponential tilting, "EEL" for Euclidean empirical likelihood, "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). "REEL" is a restricted version of "EEL" in which the probabilities are bounded below by zero. In that case, an analytical Kuhn-Tucker method is used to find the solution.

initTheta

Method to obtain the starting values for the coefficient vector. By default the GMM estimate with identity matrix is used. The second argument means that the theta0 of the object, if any, should be used.

lambda0

Manual starting values for the Lagrange multiplier. By default, it is a vector of zeros.

cstLHS

The left hand side of the constraints to impose on the coefficients. See restModel for more details.

cstRHS

The right hand side of the constraints to impose on the coefficients. See restModel for more details.

getVcov

Should the method computes the covariance matrices of the coefficients and Lagrange multipliers.

lamSlv

An alternative solver for the Lagrange multiplier. By default, either Wu_lam, EEL_lam, REEL_lam or getLambda is used.

coefSlv

Minimization solver for the coefficient vector.

lControl

A list of controls for the Lagrange multiplier algorithm.

tControl

A list of controls for the coefficient algorithm.

restrictLam

Should we restrict the lambdas for which the analytical solution is 0 to be fixed at 0?

orthoBases

If TRUE, the matrix of balancing moments is replaced by the matrix of orthogonal bases that span the same space. It is likely to be more stable and to prevent some balancing moments to be collinear.

Value

'causalGEL' returns an object of classesof "causalGelfit".

Examples

data(nsw)

balm <- ~age+ed+black+hisp:married+nodeg+re75+I(re75^2)
g <- re78~treat
           
fit1 <-  causalGEL(g, balm, nsw, gelType="ET")
fit1

fit2 <-  causalGEL(g, balm, nsw, gelType="EL")
fit2

## This is REEL, which is EEL with restriction in pt to be positive.
## It is based on the quadprog package

fit3 <-  causalGEL(g, balm, nsw, gelType="REEL")
fit3


[Package causalGel version 0.2 Index]