nma.nodesplit: Node-splitting model for testing consistency at the...

View source: R/inconsistency.functions.R

nma.nodesplitR Documentation

Node-splitting model for testing consistency at the treatment-level

Description

Splits contributions for a given set of treatment comparisons into direct and indirect evidence. A discrepancy between the two suggests that the consistency assumption required for NMA (and subsequently MBNMA) may violated.

Usage

nma.nodesplit(
  network,
  likelihood = NULL,
  link = NULL,
  method = "common",
  comparisons = NULL,
  drop.discon = TRUE,
  ...
)

## S3 method for class 'nma.nodesplit'
plot(x, plot.type = NULL, ...)

Arguments

network

An object of class mbnma.network.

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.

method

Can take either "common" or "random" to indicate whether relative effects should be modelled with between-study heterogeneity or not (see details).

comparisons

A matrix specifying the comparisons to be split (one row per comparison). The matrix must have two columns indicating each treatment for each comparison. Values can either be character (corresponding to the treatment names given in network) or numeric (corresponding to treatment codes within the network - note that these may change if drop.discon = TRUE).

drop.discon

A boolean object that indicates whether to drop treatments that are disconnected at the treatment level. Default is TRUE. If set to FALSE then this could lead to identification of nodesplit comparisons that are not connected to the network reference treatment, or lead to errors in running the nodesplit models, though it can be useful for error checking.

...

Arguments to be sent to ggplot2::ggplot()

x

An object of class("nma.nodesplit")

plot.type

A character string that can take the value of "forest" to plot only forest plots, "density" to plot only density plots, or left as NULL (the default) to plot both types of plot.

Details

The S3 method plot() on an nma.nodesplit object generates either forest plots of posterior medians and 95\% credible intervals, or density plots of posterior densities for direct and indirect evidence.

Value

Plots the desired graph(s) and returns an object (or list of object if plot.type=NULL) of class(c("gg", "ggplot"))

Methods (by generic)

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

Examples


# Using the triptans data
network <- mbnma.network(triptans)

split <- nma.nodesplit(network, likelihood = "binomial", link="logit",
  method="common")



#### To perform nodesplit on selected comparisons ####

# Check for closed loops of treatments with independent evidence sources
loops <- inconsistency.loops(network$data.ab)

# This...
single.split <- nma.nodesplit(network, likelihood = "binomial", link="logit",
             method="random", comparisons=rbind(c("sumatriptan_1", "almotriptan_1")))

#...is the same as...
single.split <- nma.nodesplit(network, likelihood = "binomial", link="logit",
             method="random", comparisons=rbind(c(6, 12)))


# Plot results
plot(split, plot.type="density") # Plot density plots of posterior densities
plot(split, plot.type="forest") # Plot forest plots of direct and indirect evidence

# Print and summarise results
print(split)
summary(split) # Generate a data frame of summary results


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