This function constructs exposure-outcome models for each cohort using available exposure and outcome variables, and optionally available covariates.
Value
A tibble containing four columns: (i) cohort, (ii) exposure, (iii) outcome, (iv)
regression formula with these combinations. Optionally contains fifth column with list of
covariates if avail_cov is not null.
Details
The function performs the following steps:
Summarizes available exposure and outcome variables.
Combines available exposure and outcome variables for all cohorts.
Tidies up the combinations.
If covariates are available, it splits combinations by cohort, adds covariates, and creates formulas.
Returns the constructed models or formulas.