View source: R/causal_cdcorr.R
cb.align.vm_trim | R Documentation |
A function for implementing the vector matching procedure, a pre-processing step for causal conditional distance correlation. Uses propensity scores to strategically include/exclude samples from subsequent inference, based on whether (or not) there are samples with similar propensity scores across all treatment levels (conceptually, a k-way "propensity trimming"). It is imperative that this function is used in conjunction with domain expertise to ensure that the covariates are not colliders, and that the system satisfies the strong ignorability condiiton to derive causal conclusions.
cb.align.vm_trim(
Ts,
Xs,
prop.form = NULL,
retain.ratio = 0.05,
ddx = FALSE,
reference = NULL
)
Ts |
|
Xs |
|
prop.form |
a formula specifying a propensity scoring model. Defaults o |
retain.ratio |
If the number of samples retained is less than |
ddx |
whether to show additional diagnosis messages. Defaults to |
reference |
the name of a reference label, against which to align other labels. Defaults to |
a [m]
vector containing the indices of samples retained after vector matching.
For more details see the help vignette:
vignette("causal_balancing", package = "causalBatch")
Eric W. Bridgeford
Michael J. Lopez, et al. "Estimation of Causal Effects with Multiple Treatments" Statistical Science (2017). ran
library(causalBatch)
sim <- cb.sims.sim_linear(a=-1, n=100, err=1/8, unbalancedness=3)
cb.align.vm_trim(sim$Ts, sim$Xs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.