UpdateVariances: Exposure and outcome model residual variances

Description Usage Arguments Value

Description

Updating the residual variance of the exposure and outcome models within each experiment.

Usage

1
2
UpdateVariances(dta, current_cutoffs, current_coefs, cov_cols,
  alpha_priorX, beta_priorX, alpha_priorY, beta_priorY)

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, ...

current_cutoffs

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

current_coefs

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

cov_cols

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

alpha_priorX

The shape parameter of the inverse gamma prior on the residual variance of the exposure model.

beta_priorX

The rate parameter of the inverse gamma prior on the residual variance of the exposure model.

alpha_priorY

The shape parameter of the inverse gamma prior on the residual variance of the outcome model.

beta_priorY

The rate parameter of the inverse gamma prior on the residual variance of the outcome model.

Value

Matrix with rows corresponding to the exposure/outcome model and columns corresponding to the experiment.


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