Description Usage Arguments Details Value Author(s) See Also Examples
getStandardizedCovMeanDiffs
computes the standardized covariate mean differences between a treatment and control group, defined as treatment minus control. The standardized covariate mean differences are defined as the covariate mean differences divided by the square-root of the pooled variance between groups.
1 2 | getStandardizedCovMeanDiffs(X.matched, indicator.matched,
X.full = NULL, indicator.full = NULL)
|
X.matched |
A covariate matrix (rows correspond to subjects/units; columns correspond to covariates) for the matched dataset. |
indicator.matched |
A vector of 1s and 0s (e.g., denoting treatment and control) for the matched dataset. |
X.full |
A covariate matrix (rows correspond to subjects/units; columns correspond to covariates) for the full, unmatched dataset if available. |
indicator.full |
A vector of 1s and 0s (e.g., denoting treatment and control) for the full, unmatched dataset if available. |
The arguments X.full and indicator.full (i.e., the covariate matrix and indicator for the full, unmatched dataset) are only used to correctly define the standardized covariate mean differences. Technically, the covariate mean differences should be standardized by the pooled variance within the full, unmatched dataset, instead of within the matched dataset. If X.full and indicator.full are unspecified, the pooled variance within the matched dataset is used for standardization instead. This distinction rarely leads to large differences in the resulting standardized covariate mean differences, and so researchers should feel comfortable only specifying X.matched and indicator.matched if only a matched dataset is available. Furthermore, if one wants to compute the standardized mean differences for a full, unmatched dataset, then they should only specify X.matched and indicator.matched.
The standardized covariate mean differences between a treatment and control group, defined as treatment minus control.
Zach Branson
See also lalondeMatches
for details about the Lalonde and matched datasets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #This loads the classic Lalonde (1986) dataset,
#as well as two matched datasets:
#one from 1:1 propensity score matching,
#and one from cardinality matching, where
#the standardized covariate mean differences are all below 0.1.
data("lalondeMatches")
#obtain the covariates for these datasets
X.lalonde = subset(lalonde, select = -c(treat))
X.matched.ps = subset(lalonde.matched.ps, select = -c(treat,subclass))
X.matched.card = subset(lalonde.matched.card, select = -c(treat,subclass))
#the treatment indicators are
indicator.lalonde = lalonde$treat
indicator.matched.ps = lalonde.matched.ps$treat
indicator.matched.card = lalonde.matched.card$treat
#the standardized covariate mean differences
#for these three datasets are:
getStandardizedCovMeanDiffs(
X.matched = X.lalonde,
indicator.matched = indicator.lalonde)
getStandardizedCovMeanDiffs(
X.matched = X.matched.ps,
indicator.matched = indicator.matched.ps,
X.full = X.lalonde,
indicator.full = indicator.lalonde)
getStandardizedCovMeanDiffs(
X.matched = X.matched.card,
indicator.matched = indicator.matched.card,
X.full = X.lalonde,
indicator.full = indicator.lalonde)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.