write.ref.synth {MBNMAtime} | R Documentation |
Write MBNMA time-course models JAGS code for synthesis of studies investigating reference treatment
Description
Writes JAGS code for a Bayesian time-course model for model-based network meta-analysis (MBNMA) that pools reference treatment effects from different studies. This model only pools single study arms and therefore does not pool relative effects.
Usage
write.ref.synth(
fun = tpoly(degree = 1),
link = "identity",
positive.scale = TRUE,
intercept = TRUE,
rho = 0,
covar = "varadj",
mu.synth = "random",
priors = NULL
)
Arguments
fun |
An object of class |
link |
Can take either |
positive.scale |
A boolean object that indicates whether all continuous mean responses (y) are positive and therefore whether the baseline response should be given a prior that constrains it to be positive (e.g. for scales that cannot be <0). |
intercept |
A boolean object that indicates whether an intercept (written
as |
rho |
The correlation coefficient when modelling within-study correlation between time points. The default is a string representing a
prior distribution in JAGS, indicating that it be estimated from the data (e.g. |
covar |
A character specifying the covariance structure to use for modelling within-study correlation between time-points. This can be done by specifying one of the following:
|
mu.synth |
A string that takes the value |
priors |
A named list of parameter values (without indices) and replacement prior distribution values given as strings using distributions as specified in JAGS syntax (see Plummer (2017)). |
Value
A character object of JAGS MBNMA model code that includes beta parameter components of the model
Examples
# Write a log-linear time-course MBNMA synthesis model with:
# Common effects for synthesis of mu
# Modelled as ratio of means
model <- write.ref.synth(fun=tloglin(pool.rate="rel", method.rate="common"),
mu.synth="common", link="log")
cat(model) # Concatenates model representations making code more easily readable