nma.run: Run an NMA model

View source: R/run.functions.R

plot.nmaR Documentation

Run an NMA model

Description

Used for calculating treatment-level NMA results, either when comparing MBNMA models to models that make no assumptions regarding dose-response , or to estimate split results for overlay.split. Results can also be compared between consistency (UME=FALSE) and inconsistency (UME=TRUE) models to test the validity of the consistency assumption at the treatment-level.

Usage

## S3 method for class 'nma'
plot(x, bydose = TRUE, scales = "free_x", ...)

nma.run(
  network,
  method = "common",
  likelihood = NULL,
  link = NULL,
  priors = NULL,
  sdscale = FALSE,
  warn.rhat = TRUE,
  n.iter = 20000,
  drop.discon = TRUE,
  UME = FALSE,
  pd = "pd.kl",
  parameters.to.save = NULL,
  ...
)

Arguments

x

An object of class("nma")

bydose

A boolean object indicating whether to plot responses with dose on the x-axis (TRUE) to be able to examine potential dose-response shapes, or to plot a conventional forest plot with all treatments on the same plot (FALSE)

scales

Should scales be fixed ("fixed", the default), free ("free"), or free in one dimension ("free_x", "free_y")?

...

Arguments to be sent to ggplot2::ggplot()

network

An object of class mbnma.network.

method

Indicates the type of split (treatment-level) NMA to perform when overlay.split=TRUE. Can take either "common" or "random".

likelihood

A string indicating the likelihood to use in the model. Can take either "binomial", "normal" or "poisson". If left as NULL the likelihood will be inferred from the data.

link

A string indicating the link function to use in the model. Can take any link function defined within JAGS (e.g. "logit", "log", "probit", "cloglog"), be assigned the value "identity" for an identity link function, or be assigned the value "smd" for modelling Standardised Mean Differences using an identity link function. If left as NULL the link function will be automatically assigned based on the likelihood.

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 \insertCitejagsmanual;textualMBNMAdose). Note that normal distributions in JAGS are specified as

N(\mu, prec)

, where

prec = 1 / {\sigma^2}

.

sdscale

Logical object to indicate whether to write a model that specifies a reference SD for standardising when modelling using Standardised Mean Differences. Specifying sdscale=TRUE will therefore only modify the model if link function is set to SMD (link="smd").

warn.rhat

A boolean object to indicate whether to return a warning if Rhat values for any monitored parameter are >1.02 (suggestive of non-convergence).

n.iter

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

drop.discon

A boolean object that indicates whether or not to drop disconnected studies from the network.

UME

A boolean object to indicate whether to fit an Unrelated Mean Effects model that does not assume consistency and so can be used to test if the consistency assumption is valid.

pd

Can take either:

  • pv only pV will be reported (as automatically outputted by R2jags).

  • plugin calculates pD by the plug-in method \insertCitespiegelhalter2002MBNMAdose. It is faster, but may output negative non-sensical values, due to skewed deviances that can arise with non-linear models.

  • pd.kl calculates pD by the Kullback-Leibler divergence \insertCiteplummer2008MBNMAdose. This will require running the model for additional iterations but is a more robust calculation for the effective number of parameters in non-linear models.

  • popt calculates pD using an optimism adjustment which allows for calculation of the penalized expected deviance \insertCiteplummer2008MBNMAdose.

parameters.to.save

A character vector containing names of parameters to monitor in JAGS

Functions

  • plot(nma): Plot outputs from treatment-level NMA models

    Results can be plotted either as a single forest plot, or facetted by agent and plotted with increasing dose in order to identify potential dose-response relationships. If Placebo (or any agents with dose=0) is included in the network then this will be used as the reference treatment, but if it is not then results will be plotted versus the network reference used in the NMA object (x).

Examples


# Run random effects NMA on the alogliptin dataset
alognet <- mbnma.network(alog_pcfb)
nma <- nma.run(alognet, method="random")
print(nma)
plot(nma)

# Run common effects NMA keeping treatments that are disconnected in the NMA
goutnet <- mbnma.network(gout)
nma <- nma.run(goutnet, method="common", drop.discon=FALSE)

# Run an Unrelated Mean Effects (UME) inconsistency model on triptans dataset
tripnet <- mbnma.network(triptans)
ume <- nma.run(tripnet, method="random", UME=TRUE)



MBNMAdose documentation built on Aug. 8, 2023, 5:11 p.m.