new_BGrass_chain: Initialize a new BGrass chain

View source: R/new_BGrass_chain.R

new_BGrass_chainR Documentation

Initialize a new BGrass chain

Description

Initialize a new BGrass chain

Usage

new_BGrass_chain(
  A,
  V,
  X,
  L,
  G = NULL,
  nn = rep(1, nrow(A)),
  epsilon = 0.2,
  a_alpha = 0.1,
  b_alpha = 0.1,
  a_tau = 0.5,
  b_tau = 0.5,
  a_gammaG = 0.5,
  b_gammaG = 0.5,
  pi_delta = 0.5,
  n_thin = 1,
  aggregation = TRUE,
  enrichment = FALSE
)

Arguments

A

A 0-1 matrix with n rows and J columns (J AEs). The i-j th element of A indicates whether the j th AE is reported in report i.

V

A 0-1 vector of length n indicating the type pf vaccine in each report.

X

The covariate matrix of dim n by p + 1 (p covariates and a column of intercept)

L

The J by J normalized graph Laplacian matrix of AEs. You can get it using the function getLaplacian.

G

The J by K matrix indicating the groups each AE comes from. if !enrichment, this argument should be set to NULL. You can get it using the function getG. (It is not useful right now)

nn

If A is already aggregated, indicate the number of reports corresponding the each row of A. The function will assume the data is not aggregated, so nn = rep(1, nrow(A)) by default.

epsilon

A hyperparameter, controlling the level of information borrowing.

a_alpha

A hyperparameter

b_alpha

A hyperparameter

a_tau

A hyperparameter

b_tau

A hyperparameter

a_gammaG

For enrichment, not useful right now.

b_gammaG

For enrichment, not useful right now.

pi_delta

A hyperparameter controlling delta, only useful when not doing enrichment. If no variable selection is wanted, set pi_delta = 1.

n_thin

Thinning parameter. The number of draws for one valid MCMC sample.

aggregation

Whether to perform aggregation. This will usually speed up the function without changing the result.

enrichment

Whether to perform enrichment. This is under development, do not use this.

Value

new_BGrass_chain returns an object of S3 class 'BGrass_chain' that is ready for method update

help('update.BGrass_chain')

help('logLik.BGrass_chain')


BangyaoZhao/BV documentation built on June 30, 2023, 4:28 p.m.