Quantile g-computation wrapper function to automate analysis for multiple outcomes. Additionally, allows flexibility to perform stratified analysis.

qgcomp_func(
  outcomes,
  data,
  output_folder,
  chemicals,
  covariates,
  include_sex = TRUE,
  include_cohort = TRUE,
  q,
  b,
  seed
)

Arguments

outcomes

input a list of outcome variables

output_folder

complete location to a folder to save the output RDA files

chemicals

list of variables that need to be considered as exposure mixture

covariates

list of covariate variables

include_sex

input TRUE or FALSE for sex specific stratification

include_cohort

input TRUE or FALSE for cohort specific stratification

q

input a numeric value for number of quantiles

b

input a numeric value for number of random bootstrap samples

seed

input a numeric value for random sample generation for bootstrap process

dat

input dataset in tibble format

Value

This function will return RDA output files for each model run by boot and non-bootstrap method. Filenames will specify boot or nonboot, sex or cohort specific, and outcome name.