Skip to contents

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.

Usage

adj_coexposure(
  exposure.data,
  object,
  contrast_perc = c(0.25, 0.75),
  contrast_exp = list(),
  conf.level = 0.95,
  keep.mcmc = FALSE,
  verbose = TRUE
)

Arguments

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

Value

data.frame of plot data with exposure name, posterior mean, and credible intervals, or posterior samples if keep.mcmc = TRUE

Details

adj_coexposure