View source: R/Harmonization.R
comfam | R Documentation |
Implementation of the ComBat Family of harmonization methods allowing for flexible covariate modeling and alternative estimators for site effect adjustment. Support for modeling of both location and scale via GAMLSS and longitudinal harmonization via mixed effects models.
comfam(
data,
bat,
covar = NULL,
model = lm,
formula = NULL,
eb = TRUE,
robust.LS = FALSE,
ref.batch = NULL,
...
)
data |
n x p data frame or matrix of observations where p is the number of features and n is the number of subjects. |
bat |
Factor indicating batch (often equivalent to site or scanner) |
covar |
Data frame or matrix of covariates supplied to |
model |
Model function. ComBat Family supports any models that take
arguments |
formula |
Formula for |
eb |
If |
robust.LS |
If |
ref.batch |
Reference batch, must take value in |
... |
Additional arguments to |
comfam
returns a list containing the following components:
dat.combat |
Harmonized data as a matrix with same dimensions as |
batch.info |
Batch information, including reference batch if specified |
fits |
List of model fits from regression step, outputs of |
estimates |
List of estimates from standardization and batch effect correction |
predict.comfam for applying ComBat parameters for harmonization of new observations
comfam(iris[,1:2], iris$Species)
comfam(iris[,1:2], iris$Species, iris[3:4], lm, y ~ Petal.Length + Petal.Width)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.