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/RtmpfcAta0/file1a4051cc8f13", 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.103   0.081  -2.266  -2.158  -2.103  -2.048  -1.947 1.001  3000
#> deviance -38.895  12.170 -61.401 -47.661 -39.272 -31.389 -13.903 1.003   810
#> 
#> 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 = 73.9 and DIC = 35.0
#> 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/RtmpfcAta0/file1a403ca9a206", 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.653   0.149   -1.946   -1.747   -1.651   -1.557   -1.357 1.002
#> sd.mu.1     0.726   0.115    0.533    0.643    0.713    0.794    0.978 1.001
#> deviance -130.991  11.971 -152.354 -139.511 -131.842 -123.328 -106.285 1.003
#>          n.eff
#> mu.1      3000
#> sd.mu.1   3000
#> deviance   970
#> 
#> 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.5 and DIC = -59.4
#> DIC is an estimate of expected predictive error (lower deviance is better).
# }