View source: R/causal_ccombat.R
cb.align.kway_match | R Documentation |
A function for performing k-way matching using the matchIt package. Looks for samples which have corresponding matches across all other treatment levels.
cb.align.kway_match(
Ts,
Xs,
match.form,
reference = NULL,
match.args = list(method = "nearest", exact = NULL, replace = FALSE, caliper = 0.1),
retain.ratio = 0.05
)
Ts |
|
Xs |
|
match.form |
A formula of columns from |
reference |
the name of the reference/control batch, against which to match. Defaults to |
match.args |
A named list arguments for the |
retain.ratio |
If the number of samples retained is less than |
a list, containing the following:
Retained.Ids
[m]
vector consisting of the sample ids of the n
original samples that were retained after matching.
Reference
the reference batch.
For more details see the help vignette:
vignette("causal_balancing", package = "causalBatch")
Eric W. Bridgeford
Eric W. Bridgeford, et al. "A Causal Perspective for Batch Effects: When is no answer better than a wrong answer?" Biorxiv (2024).
Daniel E. Ho, et al. "MatchIt: Nonparametric Preprocessing for Parametric Causal Inference" JSS (2011).
library(causalBatch)
sim <- cb.sims.sim_linear(a=-1, n=100, err=1/8, unbalancedness=1.5)
cb.align.kway_match(sim$Ts, data.frame(Covar=sim$Xs), "Covar")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.