UpdateVariances: MCMC update of the residual variance.

Description Usage Arguments

View source: R/UpdateVariances_function.R

Description

MCMC update of the residual variance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
UpdateVariances(
  X,
  Y,
  D,
  current_alphas,
  current_coefs,
  alpha_priorX,
  alpha_priorY,
  beta_priorX,
  beta_priorY
)

Arguments

X

Vector of the treatment

Y

Vector of the outcome.

D

Matrix or data frame where the columns correspond to all possible predictors of Y, and the rows correspond to the units.

current_alphas

Matrix of inclusion indicators with rows corresponding to exposure and outcome models and columns to covariates.

current_coefs

Matrix of coefficients with rows corresponding to exposure and outcome models and columns to intercept, exposure and covariates.

alpha_priorX

The value of alpha in the inverse gamma prior for the residual variance of the exposure model.

alpha_priorY

The value of alpha in the inverse gamma prior for the residual variance of the outcome model.

beta_priorX

The value of beta in the inverse gamma prior for the residual variance of the exposure model.

beta_priorY

The value of beta in the inverse gamma prior for the residual variance of the outcome model.


gpapadog/BAC documentation built on Feb. 15, 2021, 6:37 a.m.