bac: Bayesian Adjustment for Confounding (BAC)

Description Usage Arguments Details Value Author(s) References See Also

View source: R/bac.R

Description

Estimating the Average Causal Effect (ACE) based on the BAC algorithm

Usage

1
2
3
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.

Details

The function may run slowly for data with large sample size or many potential confounders. The users are suggested to choose small number of iterations first, evaluate the computational speed, then increase the number of iterations. Note that this function assumes a non-informative prior for outcome model coefficients and does not handle informative priors.

Value

a list variable, which contains

data

a data from containing the input data.

MX

a matrix of MCMC samples of exposure models.

MY

a matrix of MCMC samples of outcome models.

models

a list variable containing unique outcome models in the MCMC sample and the appearence frequencies.

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.

predictorsY

All the possible predictors of the outcome.

ACE

a vector of MCMC samples of the ACE.

para

a list of model parameters

Author(s)

Chi Wang

References

Wang C, Dominici F, Parmigiani G, Zigler CW. Accounting for Uncertainty in Confounder and Effect Modifier Selection When Estimating Average Causal Effects in Generalized Linear Models.
Biometrics, 71(3): 654-665, 2015.

See Also

plot.bacr, summary.bacr


bacr documentation built on May 1, 2019, 9:18 p.m.