powered by
Generate appropriate regression models based on the model type and formula
model_gen( y, type = "lm", batch = NULL, covariates = NULL, interaction = NULL, random = NULL, smooth = NULL, df )
A regression model object to be used for batch effect diagnostics and the post-harmonization stage.
Dependent variable in the model.
A model function name that is used or to be used in the ComBatFamily Package (eg: "lmer", "lm", "gam").
Name of batch variable (often equivalent to site or scanner).
Name of covariates supplied to model.
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.
Dataset to be harmonized.
model_gen(y = "thickness.left.caudal.anterior.cingulate", type = "lm", batch = "manufac", covariates = c("AGE", "SEX"), df = adni)
Run the code above in your browser using DataLab