nma.run: Run an NMA model

View source: R/run.functions.R

nma.runR Documentation

Run an NMA model

Description

Run an NMA model

Usage

nma.run(
  data.ab,
  treatments = NULL,
  method = "common",
  link = "identity",
  sdscale = FALSE,
  ...
)

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 aggregate response for a given observation (e.g. mean)

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

  • treatment Treatment identifiers (can be numeric, factor or character)

  • class An optional column indicating a particular class identifier. Observations with the same treatment identifier must also have the same class identifier.

  • n An optional column indicating the number of participants used to calculate the response at a given observation (required if modelling using Standardised Mean Differences)

  • standsd An optional column of numeric data indicating reference SDs used to standardise treatment effects when modelling using Standardised Mean Differences (SMD).

treatments

A vector of treatment names. If left as NULL it will use the treatment coding given in data.ab

method

Can take "common" or "random" to indicate the type of NMA model used to synthesise data points given in overlay.nma. The default is "random" since this assumes different time-points in overlay.nma have been lumped together to estimate the NMA.

link

Can take either "identity" (the default), "log" (for modelling Ratios of Means \insertCitefriedrich2011MBNMAtime) or "smd" (for modelling Standardised Mean Differences - although this also corresponds to an identity link function).

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

...

Options for plotting in igraph.

Value

Returns an object of class("nma", "rjags")

Examples

network <- mb.network(osteopain)

# Get the latest time point
late.time <- get.latest.time(network)

# Get the closest time point to a given value (t)
early.time <- get.closest.time(network, t=7)

# Run NMA on the data
nma.run(late.time$data.ab, treatments=late.time$treatments,
  method="random")


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