UpdateAlphas: Update the inclusion indicators from their full conditional.

Description Usage Arguments Value

Description

Use Gibbs sampling to update the inclusion indicator of all covariates in the exposure and outcome models.

Usage

1
2
UpdateAlphas(dta, cov_cols, current_cutoffs, current_alphaY, current_coefs,
  current_vars, mu_priorX, Sigma_priorX, mu_priorY, Sigma_priorY, omega)

Arguments

dta

A data set including a column of the exposure of interest as X, the outcome of interest as Y, and all potential confounders as C1, C2, ...

cov_cols

The indices of the columns in dta corresponding to the potential confounders.

current_cutoffs

Numeric of length K. The current values for the points in the experiment configuraiton.

current_alphaY

Matrix of 0/1 entries. Rows correspond to experiments, and columns to covariate. Entries 0/1 represent exclusion/inclusion of the covaraite in the corresponding outcome model.

current_coefs

The current coefficients of the MCMC. Three dimensional array with dimensions corresponding to exposure/outcome model, experiment, and coefficients (intercept, slope, covariates).

current_vars

Matrix. Rows correspond to exposure/outcome model, and columns to experiments. Entries are the current variances.

mu_priorX

The mean of the normal prior on the coefficients of the exposure model. Numeric vector of length equal to the number of potential confounders + 1 with the first entry corresponding to the intercept.

Sigma_priorX

Covariance matrix of the normal prior on the regression coefficients of the exposure model.

mu_priorY

The mean of the normal prior on the coefficients of the outcome model. Numeric vector with entries corresponding to intercept, slope of exposure, and potential covariates.

Sigma_priorY

The covariance matrix of the normal prior on the regression coefficients of the outcome model.

omega

The omega of the BAC prior.

Value

Array of the inclusion indicators where the dimensions correspond to the exposure/outcome model, experiment and covariates.


gpapadog/LERCA documentation built on June 4, 2019, 11:40 a.m.