mb.nodesplit: Perform node-splitting on a MBNMA time-course network

View source: R/nodesplit.functions.R

plot.nodesplitR Documentation

Perform node-splitting on a MBNMA time-course network

Description

Within a MBNMA time-course network, split contributions into direct and indirect evidence and test for consistency between them. Closed loops of treatments in which it is possible to test for consistency are those in which direct and indirect evidence are available from independent sources van Valkenhoef \insertCitevanvalkenhoef2016;textualMBNMAtime.

Usage

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

mb.nodesplit(
  network,
  comparisons = mb.nodesplit.comparisons(network),
  nodesplit.parameters = "all",
  fun = tpoly(degree = 1),
  times = NULL,
  lim = "cred",
  ...
)

Arguments

x

An object of class("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.

params

A character vector corresponding to a time-course parameter(s) for which to plot results. If left as NULL (the default), nodes-split results for all time-course parameters will be plotted.

...

Arguments to be sent to mb.run()

network

An object of class "mb.network".

comparisons

A data frame specifying the comparisons to be split (one row per comparison). The frame has two columns indicating each treatment for each comparison: t1 and t2.

nodesplit.parameters

A character vector of named time-course parameters on which to node-split (e.g. c("beta.1", "beta.2")). Can use "all" to split on all time-course parameters.

fun

An object of class "timefun" generated (see Details) using any of tloglin(), tpoly(), titp(), temax(), tfpoly(), tspline() or tuser()

times

A sequence of positive numbers indicating which time points to predict mean responses for (or at which to conduct a node-split if used with mb.nodesplit())

lim

Specifies calculation of either 95% credible intervals (lim="cred") or 95% prediction intervals (lim="pred").

Details

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

Note that by specifying the times argument a user can perform a node-split of treatment effects at a specific time-point. This will give the treatment effect for both direct, indirect, and MBNMA estimates at this time point.

Value

Plots the desired graph(s) and returns an object (or list of objects if plot.type=NULL) of class(c("gg", "ggplot")), which can be edited using ggplot commands.

A an object of class("mb.nodesplit") that is a list containing elements d.X.Y (treatment 1 = X, treatment 2 = Y). Each element (corresponding to each comparison) contains additional numbered elements corresponding to each parameter in the time-course function on which node splitting was performed. These elements then contain:

  • ⁠overlap matrix⁠ MCMC results for the difference between direct and indirect evidence

  • p.values Bayesian p-value for the test of consistency between direct and indirect evidence

  • quantiles

  • forest.plot

  • density.plot

  • direct MCMC results for the direct evidence

  • indirect MCMC results for the indirect evidence

Functions

  • plot(nodesplit): Plot outputs from nodesplit models

References

\insertAllCited

Examples


# Create mb.network object
painnet <- mb.network(osteopain)

# Identify comparisons informed by direct and indirect evidence
splits <- mb.nodesplit.comparisons(painnet)

# Fit a log-linear time-course MBNMA (takes a while to run)
result <- mb.nodesplit(painnet, comparisons=splits, nodesplit.parameters="all",
  fun=tloglin(pool.rate="rel", method.rate="common"),
  rho="dunif(0,1)", covar="varadj"
  )

# Fit an emax time-course MBNMA with a node-split on emax parameters only
result <- mb.nodesplit(painnet, comparisons=splits, nodesplit.parameters="emax",
  fun=temax(pool.emax="rel", method.emax="common",
    pool.et50="rel", method.et50="common"))

# Inspect results
print(result)
summary(result)

# Plot results
plot(result)


MBNMAtime documentation built on Oct. 14, 2023, 5:08 p.m.