Adjusting for expected changes in co-exposure (TDLMM)
Adjusting for expected changes in co-exposure (TDLMM)
Estimates the marginal effects of an exposure while accounting for expected changes in co-occurring exposures at the same time point. Values of co-occurring exposures are modeled nonlinearly using a spline model with predictions made at the lower an upper values for the exposure of interest.
exposure.data: Named list of exposure matrices used as input to TDLMM.
object: Model output for TDLMM from dlmtree() function.
contrast_perc: 2-length vector of percentiles or named list corresponding to lower and upper exposure percentiles of interest. Names must equal list names in 'exposure.data'.
contrast_exp: Named list consisting lower and upper exposure values. This takes precedence over contrast_perc if both inputs are used.
conf.level: Confidence level used for estimating credible intervals. Default is 0.95.
keep.mcmc: If TRUE, return posterior samples.
verbose: TRUE (default) or FALSE: print output
Returns
data.frame of plot data with exposure name, posterior mean, and credible intervals, or posterior samples if keep.mcmc = TRUE