altCausal | R Documentation |
This documentation file presents a collection of popular methods used to estimate the average causal effect, the causal effect on the treated and the causal effect on the nontreated.
matching(form, balm, data, type=c("ACE","ACT","ACN"), M=4,
psForm=NULL, bcForm=NULL, vJ=4)
LLmatching(form, psForm, data, type=c("ACE","ACT","ACN"),
kern=c("Gaussian","Epanechnikov"),tol=1e-4,
h=NULL, from=.00001, to=5, ngrid=10, maxit=100,
hMethod=c("Brent","Grid"))
ipw(form, psForm, data, type=c("ACE","ACT","ACN"),
normalized=FALSE, tolPS=0, ...)
form |
A formula that links the outcome variable to the treatment indicator. For the moment, only one treatment group is allowed. |
balm |
A formula or a matrix with balancing covariates to be matched. |
data |
A data.frame or a matrix with column names. |
type |
The type of causal effect to compute. |
M |
The minimum number of matches |
psForm |
It is the |
bcForm |
A formula that represents the right hand side in the regression used for the bias correction. |
kern |
The type of kernel to use in the local linear regression method. |
tol |
The tolerance level for the stopping rule used to compute the optimal bandwidth. |
tolPS |
Observations for which the propensity scores are not
between |
h |
A fixed bandwidth. By default, the optimal bandwidth is found by minimizing a cross-validation. |
from |
The lower bound for the search of the optimal bandwidth. |
to |
The upper bound for the search of the optimal bandwidth. |
ngrid |
The number of grid points if the optimal bandwidth is obtained by grid search. |
maxit |
The maximum number of iterations for the minimization of the cross-validation. |
hMethod |
The method used to find the optimal bandwidth. |
normalized |
Should the weights be normalized. If set to
|
vJ |
The minimum number of matches for the standard error estimation |
... |
Additional arguments to pass to |
All methods return an object of classes "causalfit"
. It is a
list with the following elements:
estim |
The causal effect estimate. |
se |
The standard error estimate of the causal effect. |
type |
The type of causal effect. It is the value of the
argument |
method |
A description of the method. |
form |
A list of formulas used for the estimation. |
details |
A more detailed description of the method. |
info |
Convergence information if relevant. |
data(simDat3)
balm <- ~ X1 * X2
g <- Y ~ Z
ps <- Z~X1*X2
## A print and summary methods exist for this class
fit1 <- matching(form=g, balm=balm, data=simDat3, type="ACE", bcForm=balm)
fit1
fit2 <- LLmatching(form=g, psForm=ps, data=simDat3, type="ACE")
fit2
fit3 <- ipw(form=g, psForm=ps, data=simDat3, type="ACE", normalized=TRUE)
fit3
## A print and summary methods exist for this class
summary(fit1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.