Function to obtain the string that defines the default JAGS model for each data type
getModelString.RdFunction to obtain the string that defines the default JAGS model for each data type
Usage
getModelString(
label = c("binary", "binomial", "normal", "poisson", "tte"),
hyperParams = list(binomial = c(`<priorA>` = "dunif(0, 10)", `<priorB>` =
"dunif(0, 10)"), binary = c(`<priorA>` = "dunif(0, 10)", `<priorB>` =
"dunif(0, 10)"), normal = c(`<priorMu0>` = "dnorm(0, 1e-06)", `<priorInvTau>` =
"dgamma(1e-06, 1e-06)"), poisson = c(`<priorShape>` = "dgamma(1, 1)", `<priorScale>`
= "dgamma(1, 1)"), tte = c(`<priorMu0>` = "dnorm(0, 1e-06)", `<priorInvTau>` =
"dgamma(1e-06, 1e-06)")),
prior = FALSE
)Usage Notes
If hyperParams is a list, then the placeholder replacements are taken from
hyperParams[[label]], which should be a named vector. Otherwise, the
placeholder replacements are taken from hyperParams directly. Again,
hyperParams should be a named vector. Once a named vector has been
obtained from hyperParams, names of hyperParams define the placeholders
and the replacements by the corresponding values.
For example, hyperParams has the value c("<priorA>"="dunif(0, 10)",
"<priorB>"="dunif(0, 20)"), then where ever <priorA> is found in the model string, it is replaced by dunif(0, 10). Similarly, all occurrences of will be replaced bydunif(0, 20)`.
The default value of hyperParams provides the default hyperparameter values
used by rbqmR's Bayes model fitting functions.