Prepare relevant datasets and statistical test results for batch/site effect diagnostic visualization.
visual_prep(
type = "lm",
features,
batch,
covariates = NULL,
interaction = NULL,
random = NULL,
smooth = NULL,
smooth_int_type = NULL,
df,
cores = detectCores(),
mdmr = TRUE
)visual_prep returns a list containing the following components:
Residuals that might contain additive and multiplicative joint batch effects
Residuals that might contain multiplicative batch effect
PCA results
A dataframe containing the variance explained by Principal Components (PCs)
A dataframe contains features in the form of PCs
A dataframe prepared for T-SNE plots
A dataframe contains Kenward-Roger(KR) test results
A dataframe contains Fligner-Killeen(FK) test results
A dataframe contains MDMR results
A dataframe contains ANOVA test results
A dataframe contains Kruskal-Wallis test results
A dataframe contains Levene's test results
A dataframe contains Bartlett's test results
A parameter to highlight significant p-values in result table
A list contains input information like batch, covariates, df etc
The name of a regression model to be used in batch effect diagnostics stage: "lmer", "lm", "gam".
The name of the features to be evaluated.
The name of the batch variable.
Name of covariates supplied to model.
Expression of interaction terms supplied to model (eg: "age,diagnosis").
Variable name of a random effect in linear mixed effect model.
Variable name that requires a smooth function.
Indicates the type of interaction in gam models. By default, smooth_int_type is set to be "linear", representing linear interaction terms.
"categorical-continuous", "factor-smooth" both represent categorical-continuous interactions ("factor-smooth" includes categorical variable as part of the smooth),
"tensor" represents interactions with different scales, and "smooth-smooth" represents interaction between smoothed variables.
Dataset to be evaluated.
number of cores used for parallel computing.
A boolean variable indicating whether to run the MDMR test (default: TRUE).
visual_prep(type = "lm", features = colnames(adni)[43:53], batch = "manufac",
covariates = c("AGE", "SEX", "DIAGNOSIS"), df = head(adni, 500), cores = 1)
Run the code above in your browser using DataLab