data_prep | R Documentation |
Prepares the dataset for effective use in batch effect diagnostics, harmonization, and post-harmonization downstream analysis processes within the ComBatFamQC
package.
data_prep(
stage = "harmonization",
result = NULL,
features = NULL,
batch = NULL,
covariates = NULL,
df = NULL,
type = "lm",
random = NULL,
smooth = NULL,
interaction = NULL,
smooth_int_type = NULL,
predict = FALSE,
object = NULL
)
stage |
Specifies the stage of analysis for which the data preparation is intended: harmonization or residual. |
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 |
The dataset to be harmonized. This can be be skipped if |
type |
The name of a regression model to be used in batch effect diagnostics, harmonization, and the post-harmonization stage: "lmer", "lm", "gam". |
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 |
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. |
data_prep
returns a list containing the processed data and parameter-related information for batch effect diagnostics, harmonization, and post-harmonization downstream analysis.
data_prep(stage = "harmonization", result = NULL, features = colnames(adni)[43:53],
batch = "manufac", covariates = "AGE", df = head(adni, 100), type = "lm", random = NULL,
smooth = NULL, interaction = NULL, smooth_int_type = NULL, predict = FALSE, object = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.