R/subtyper.R
run_association_analysis.Rd
This function acts as a dispatcher, calling the appropriate helper (lm_anv_p_and_d or lmer_anv_p_and_d) based on whether the analysis is specified as longitudinal. It extracts key metrics and displays a progress bar.
run_association_analysis(
data,
predictors,
outcomes,
covariates,
dataset_name,
analysis_type = "Cross-Sectional",
use_delta_outcome = TRUE,
random_effects = "(1 | PTID)"
)
The dataframe containing all variables.
A character vector of predictor column names.
A character vector of outcome column names.
A character string of covariates.
A string to label the results.
A string, either "Cross-Sectional" or "Longitudinal".
A logical value. If TRUE (default), appends "_delta" to the outcome variable for longitudinal analyses.
A string for the random effects part of the LMER formula.
A tidy data frame with results for every predictor-outcome pair.