View source: R/Harmonization.R
combat_harm | R Documentation |
Conduct harmonization using four types of methods: 1) Original ComBat, 2) Longitudinal ComBat, 3) ComBat-GAM, and 4) CovBat.
combat_harm(
eb_check = FALSE,
result = NULL,
features = NULL,
batch = NULL,
covariates = NULL,
df = NULL,
type = "lm",
random = NULL,
smooth = NULL,
interaction = NULL,
smooth_int_type = NULL,
family = "comfam",
eb = TRUE,
ref.batch = NULL,
predict = FALSE,
object = NULL,
reference = NULL,
out_ref_include = TRUE,
...
)
eb_check |
A boolean variable indicating whether the user wants to run the EB assumption test before harmonization. |
result |
A list derived from |
features |
The name of the features to be harmonized. This can be skipped if |
batch |
The name of the batch variable. Can be skipped if |
covariates |
The names of covariates supplied to |
df |
Dataset to be harmonized. This can be be skipped if |
type |
The name of a regression model to be used: |
random |
The variable name of a random effect in linear mixed effect model. |
smooth |
The name of the covariates that require a smooth function. |
interaction |
Expression of interaction terms supplied to |
smooth_int_type |
A vector that indicates the types of interaction in |
family |
The type of combat family to use, |
eb |
If |
ref.batch |
The name of the reference batch. |
predict |
A boolean variable indicating whether to run ComBat from scratch or apply existing model to new dataset (currently only work for original ComBat and ComBat-GAM). |
object |
Existing ComBat model. |
reference |
Dataset to be considered as the reference group. |
out_ref_include |
A boolean variable indicating whether the reference data should be included in the harmonized data output. |
... |
Additional arguments to |
If the eb_check
is set to be FALSE, then combat_harm
returns a list containing the following components:
com_family |
ComBat family to be considered: comfam, covfam |
harmonized_df |
Harmonized dataset |
combat.object |
Saved ComBat model and relevant information, such as the batch variable name and whether the EB method is used |
If eb_check
is set to be TRUE, then combat_harm
will return a dataframe with the EB assumption test result.
combat_harm(features = colnames(adni)[43:53], batch = "manufac",
covariates = c("AGE", "SEX", "DIAGNOSIS"), df = head(adni,100), type = "lm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.