model.meta.c: Bayesian hierarchical model code for CACE meta-analysis with...

View source: R/model.meta.c.R

model.meta.cR Documentation

Bayesian hierarchical model code for CACE meta-analysis with complete compliance data

Description

This function generates part of the model code for meta-analysis when the dataset has complete compliance information for all studies, as described in Section 2.2, "the Bayesian hierarchical model" of the package manuscript. This function will be called internally if user uses the cace.meta.c function.

Usage

model.meta.c(random.effects = list(), re.values = list())

Arguments

random.effects

a list of logical values indicating whether random effects are included in the model. The list should contain the assignment for these parameters only: delta.n (δ_{in}), delta.a (δ_{ia}), delta.u (δ_{iu}), delta.v (δ_{iv}), delta.s (δ_{is}), delta.b (δ_{ib}), cor. The list should be in the form of list(delta.a = FALSE, cor = FALSE, ...). By default, this is an empty list, and all parameters are default to TRUE. Parameters that are not listed in the list are assumed to be TRUE. Note that ρ (cor) can only be included when both δ_{in} (delta.n) and δ_{ia} (delta.a) are set to TRUE. Otherwise, a warning occurs and the model continues running by forcing delta.n = TRUE and delta.a = TRUE.

re.values

a list of parameter values for the random effects. It should contain the assignment for these parameters only: alpha.n.m and alpha.n.s, which refer to the mean and standard deviation used in the normal distribution estimation of alpha.n, as well as alpha.a.m, alpha.a.s, alpha.s.m, alpha.s.s, alpha.b.m, alpha.b.s, alpha.u.m, alpha.u.s, alpha.v.m, alpha.v.s. It also contains the shape and rate parameters of the gamma distributions of the standard deviation variable of delta.n, delta.a, delta.u, delta.v delta.s, delta.b. The shape parameters are named as tau.n.h and tau.a.h, for example, and the rate parameters are named as tau.n.r and tau.a.r. You do not need to specify the shape and rate parameters if the corresponding random effect is set to FALSE in random.effects, since they will not be used anyways. By default, re.values is an empty list, and all the mean are set to 0, and alpha.n.s = alpha.a.s = 0.16, and alpha.s.s = alpha.b.s = alpha.u.s = alpha.v.s = 0.25, and the shape and rate parameters are default to 2.

Value

It returns a model string

Examples

# use default settings
model.string <- model.meta.c()

BayesCACE documentation built on Oct. 2, 2022, 5:08 p.m.