dsldMatchedATE | R Documentation |
Causal inference via matching models.
Wrapper for Matching::Match
.
dsldMatchedATE(data,yName,sName,yesSVal,yesYVal=NULL,
propensFtn=NULL,k=NULL)
data |
Data frame. |
yName |
Name of the response variable column. |
sName |
Name of the sensitive attribute column. The attribute must be dichotomous. |
yesSVal |
S value to be considered "yes," to be coded 1 rather than 0. |
yesYVal |
Y value to be considered "yes," to be coded 1 rather than 0. |
propensFtn |
Either 'glm' (logistic), or 'knn'. |
k |
Number of nearest neighbors if |
This is a dsld wrapper for Matching::Match
.
Matched analysis is typically applied to measuring "treatment effects," but is often applied in situations in which the "treatment," S here, is an immutable attribute such as race or gender. The usual issues concerning observational studies apply.
The function dsldMatchedATE
finds the estimated mean difference
between the matched Y pairs in the treated/nontreated (exposed and
non-exposed) groups, with covariates X in data
other than the
yName
and sName
columns.
In the propensity model case, we estimate P(S = 1 | X), either by a logistic or k-NN model.
Object of class 'Match'. See documentation in the Matching package.
N. Matloff
data(lalonde,package='Matching')
ll <- lalonde
ll$treat <- as.factor(ll$treat)
ll$re74 <- NULL
ll$re75 <- NULL
summary(dsldMatchedATE(ll,'re78','treat','1'))
summary(dsldMatchedATE(ll,'re78','treat','1',propensFtn='glm'))
summary(dsldMatchedATE(ll,'re78','treat','1',propensFtn='knn',k=15))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.