Fit and Apply Empirical Bayes ComBat Harmonisation
Arguments
- features
Numeric matrix (
n_features x n_samples).- batch
Factor or character vector of scanner/site batch labels of length
ncol(features).- mod
Optional biological covariate design matrix (
n_samples x q, e.g. frommodel.matrix(~ age + sex)).- eb
Logical; if
TRUE(default), applies Empirical Bayes shrinkage across features.- ref_batch
Optional reference batch name.
