Skip to contents

Synthesises single arm studies with repeated measures by applying a particular time-course function. Used in predicting mean responses from a time-course MBNMA. The same parameterisation of the time course must be used as in the MBNMA.

Usage

ref.synth(
  data.ab,
  mbnma,
  synth = "random",
  link = mbnma$model.arg$link,
  n.iter = mbnma$BUGSoutput$n.iter,
  n.burnin = mbnma$BUGSoutput$n.burnin,
  n.thin = mbnma$BUGSoutput$n.thin,
  n.chains = mbnma$BUGSoutput$n.chains,
  ...
)

Arguments

data.ab

A data frame of arm-level data in "long" format containing the columns:

  • studyID Study identifiers

  • time Numeric data indicating follow-up times

  • y Numeric data indicating the mean response for a given observation

  • se Numeric data indicating the standard error for a given observation

mbnma

An S3 object of class "mbnma" generated by running a time-course MBNMA model

synth

A character object that can take the value "common" or "random" that specifies the the type of pooling to use for synthesis of ref.resp. Using "random" rather than "common" for synth will result in wider 95\% CrI for predictions.

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).

n.iter

number of total iterations per chain (including burn in; default: 2000)

n.burnin

length of burn in, i.e. number of iterations to discard at the beginning. Default is n.iter/2, that is, discarding the first half of the simulations. If n.burnin is 0, jags() will run 100 iterations for adaption.

n.thin

thinning rate. Must be a positive integer. Set n.thin > 1 to save memory and computation time if n.iter is large. Default is max(1, floor(n.chains * (n.iter-n.burnin) / 1000)) which will only thin if there are at least 2000 simulations.

n.chains

number of Markov chains (default: 3)

...

Arguments to be sent to R2jags for synthesis of the network reference treatment effect (using ref.synth())

Value

A list of named elements corresponding to each time-course parameter within an MBNMA model that contain the median posterior value for the network reference treatment response.

Details

data.ab can be a collection of studies that closely resemble the population of interest intended for the prediction, which could be different to those used to estimate the MBNMA model, and could be include single arms of RCTs or observational studies. If other data is not available, the data used to estimate the MBNMA model can be used by selecting only the studies and arms that specify the network reference treatment responses.

Examples

# \donttest{
# Create an mb.network object from a dataset
network <- mb.network(osteopain)
#> Reference treatment is `Pl_0`
#> Studies reporting change from baseline automatically identified from the data

# Run an MBNMA model with an Emax time-course
emax <- mb.run(network,
  fun=temax(pool.emax="rel", method.emax="common",
    pool.et50="abs", method.et50="random"))
#> 'et50' parameters must take positive values.
#>  Default half-normal prior restricts posterior to positive values.
#> Compiling model graph
#>    Resolving undeclared variables
#>    Allocating nodes
#> Graph information:
#>    Observed stochastic nodes: 417
#>    Unobserved stochastic nodes: 194
#>    Total graph size: 8210
#> 
#> Initializing model
#> 

# Generate a set of studies with which to estimate the network reference treatment response
paindata.ref <- osteopain[osteopain$treatname=="Placebo_0",]

# Estimate the network reference treatment effect using common effects meta-analysis
ref.synth(data.ab=paindata.ref, mbnma=emax, synth="common")
#> Data frame must contain only data from reference treatment
#> Studies reporting change from baseline automatically identified from ref.resp
#> Compiling model graph
#>    Resolving undeclared variables
#>    Allocating nodes
#> Graph information:
#>    Observed stochastic nodes: 113
#>    Unobserved stochastic nodes: 61
#>    Total graph size: 2261
#> 
#> Initializing model
#> 
#> Inference for Bugs model at "/tmp/RtmpAXd0fj/file176e7efcc572", fit using jags,
#>  3 chains, each with 20000 iterations (first 10000 discarded), n.thin = 10
#>  n.sims = 3000 iterations saved
#>          mu.vect sd.vect    2.5%     25%     50%     75%   97.5%  Rhat n.eff
#> mu.1      -2.106   0.081  -2.272  -2.159  -2.105  -2.050  -1.950 1.003   830
#> deviance -38.666  12.402 -60.134 -47.258 -39.367 -30.694 -12.423 1.002  1600
#> 
#> For each parameter, n.eff is a crude measure of effective sample size,
#> and Rhat is the potential scale reduction factor (at convergence, Rhat=1).
#> 
#> DIC info (using the rule, pD = var(deviance)/2)
#> pD = 76.9 and DIC = 38.2
#> DIC is an estimate of expected predictive error (lower deviance is better).

# Estimate the network reference treatment effect using random effects meta-analysis
ref.synth(data.ab=paindata.ref, mbnma=emax, synth="random")
#> Data frame must contain only data from reference treatment
#> Studies reporting change from baseline automatically identified from ref.resp
#> Compiling model graph
#>    Resolving undeclared variables
#>    Allocating nodes
#> Graph information:
#>    Observed stochastic nodes: 113
#>    Unobserved stochastic nodes: 91
#>    Total graph size: 2388
#> 
#> Initializing model
#> 
#> Inference for Bugs model at "/tmp/RtmpAXd0fj/file176e19ec7c44", fit using jags,
#>  3 chains, each with 20000 iterations (first 10000 discarded), n.thin = 10
#>  n.sims = 3000 iterations saved
#>           mu.vect sd.vect    2.5%      25%      50%      75%    97.5%  Rhat
#> mu.1       -1.648   0.146   -1.94   -1.746   -1.647   -1.553   -1.366 1.002
#> sd.mu.1     0.725   0.117    0.54    0.644    0.710    0.792    0.989 1.001
#> deviance -130.836  11.930 -152.47 -139.371 -131.252 -123.052 -105.697 1.002
#>          n.eff
#> mu.1      1300
#> sd.mu.1   3000
#> deviance  1100
#> 
#> For each parameter, n.eff is a crude measure of effective sample size,
#> and Rhat is the potential scale reduction factor (at convergence, Rhat=1).
#> 
#> DIC info (using the rule, pD = var(deviance)/2)
#> pD = 71.1 and DIC = -59.8
#> DIC is an estimate of expected predictive error (lower deviance is better).
# }