R/qgcomp_wrap.R
qgcomp_func.RdQuantile 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
)input a list of outcome variables
complete location to a folder to save the output RDA files
list of variables that need to be considered as exposure mixture
list of covariate variables
input TRUE or FALSE for sex specific stratification
input TRUE or FALSE for cohort specific stratification
input a numeric value for number of quantiles
input a numeric value for number of random bootstrap samples
input a numeric value for random sample generation for bootstrap process
input dataset in tibble format
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.