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 "timefun" generated (see Details) using any of tloglin(), tpoly(), titp(), temax(), tfpoly(), tspline() or tuser()

link

Can take either "identity" (the default), "log" (for modelling Ratios of Means (Friedrich et al. 2011)) or "smd" (for modelling Standardised Mean Differences - although this also corresponds to an identity link function).

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 alpha in the model) is to be included. If left as NULL (the default), an intercept will be included only for studies reporting absolute means, and will be excluded for studies reporting change from baseline (as indicated in network$cfb).

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. rho="dunif(0,1)"). rho also be assigned a numeric value (e.g. rho=0.7), which fixes rho in the model to this value (e.g. for use in a deterministic sensitivity analysis). If set to rho=0 (the default) then this implies modelling no correlation between time points.

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:

  • "varadj" - a univariate likelihood with a variance adjustment to assume a constant correlation between subsequent time points (Jansen et al. 2015). This is the default.

  • "CS" - a multivariate normal likelihood with a compound symmetry structure

  • "AR1" - a multivariate normal likelihood with an autoregressive AR1 structure

mu.synth

A string that takes the value fixed or random, indicating the type of synthesis model to use

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


[Package MBNMAtime version 0.2.4 Index]