Usage
bac(data, exposure, outcome, confounders, interactors, familyX, familyY, omega = Inf, num_its, burnM, burnB, thin, population = NULL)
Arguments
data
a data from containing the input data.
exposure
the exposure variable
outcome
the outcome variable
confounders
a vector of potential confounder variable names
interactors
a vector of the names of potential confounders that may interact with the exposure
familyX
the family of the exposure model. Currently, it allows guassian
, binomial
, and poisson
.
familyY
the family of the outcome model. Currently, it allows guassian
, binomial
, and poisson
.
omega
a dependent parameter, which is the prior odds of including a predictor in the outcome model, given that the same predictor is in the exposure model. The default value if Inf
, which forces predictors in the exposure model to be included in the outcome model.
num_its
number of MCMC iterations excluding the burn-in iterations.
burnM
number of burn-in iterations when sampling the exposure and outcome models.
burnB
number of burn-in iterations when sampling model coefficients based on a given outcome model.
thin
the thinning parameter when sampling model coefficients based on a given outcome model.
population
the population for which the ACE is based on. It can be either unspecified or a vector of TRUE and FALSE. If unspecified, the function will estimate the ACE for the whole population. If specified, the function will estimate the ACE for the subpopulation defined by the individuals indicated by TRUE.