R/multi_linear_reg.R
lm_func.RdMultiple linear regression wrapper function that will take a list of exposure and outcome variables. Returns a matrix of results between each combination
lm_func(
dependent_vars,
independent_vars,
data,
covariates,
include_sex = TRUE,
include_cohort = TRUE,
conf_level = 0.95
)input a list of outcome variables
input a list of exposure variables
input a dataset tested with dataframe and tibble formats
input a list of confounders
input either TRUE or FALSE to perform stratified analysis
input either TRUE or FALSE to perform stratified analysis
input confidence interval level. Default to yield 95 percent Confidence interval
This function will return a dataframe that will contain exposure, outcome, cohort level, sex level, regression coefficient, 95 percent confidence interval