residual_gen | R Documentation |
Extract residuals after harmonization.
residual_gen(
type = "lm",
features = NULL,
covariates = NULL,
interaction = NULL,
random = NULL,
smooth = NULL,
smooth_int_type = NULL,
df,
rm = NULL,
model = FALSE,
model_path = NULL,
cores = detectCores()
)
type |
A model function name that is to be used (eg: |
features |
The names of the features from which to extract residuals. |
covariates |
Name of covariates supplied to |
interaction |
Expression of interaction terms supplied to |
random |
Variable name of a random effect in linear mixed effect model. |
smooth |
Variable name that requires a smooth function. |
smooth_int_type |
Indicates the type of interaction in |
df |
Harmonized dataset to extract residuals from. |
rm |
variables to remove effects from. |
model |
A boolean variable indicating whether an existing model is to be used. |
model_path |
path to the existing model. |
cores |
number of cores used for parallel computing. |
residual_gen
returns a list containing the following components:
model |
a list of regression models for all rois |
residual |
Residual dataframe |
features <- colnames(adni)[43:53]
residual_gen(type = "lm", features = features,
covariates = c("AGE", "SEX", "DIAGNOSIS"), df = adni, rm = c("AGE", "SEX"), cores = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.