Learn R Programming

netmeta (version 3.3-1)

gemtc2netmeta: Create a netmeta object from a gemtc object

Description

Auxiliary function to create a netmeta object from a gemtc object (experimental feature).

Usage

gemtc2netmeta(
  x,
  keep.samples = TRUE,
  level = gs("level"),
  level.ma = gs("level.ma"),
  reference.group = levels(x$model$network$treatments$id)[1],
  baseline.reference = gs("baseline.reference"),
  small.values = gs("small.values"),
  all.treatments = gs("all.treatments"),
  seq = gs("seq"),
  backtransf = gs("backtransf"),
  nchar.trts = gs("nchar.trts"),
  nchar.studlab = gs("nchar.studlab")
)

Value

A netmeta object with additional class "netmeta.gemtc".

Arguments

x

A gemtc object created with R package gemtc.

keep.samples

A logical indicating whether to keep the generated samples.

level

The level used to calculate confidence intervals for individual comparisons.

level.ma

The level used to calculate confidence intervals for network estimates.

reference.group

Reference treatment (first treatment is used if argument is missing).

baseline.reference

A logical indicating whether results should be expressed as comparisons of other treatments versus the reference treatment (default) or vice versa. This argument is only considered if reference.group has been specified.

small.values

A character string specifying whether small treatment effects indicate a beneficial ("desirable") or harmful ("undesirable") effect (passed on to netrank, can be abbreviated.

all.treatments

A logical or "NULL". If TRUE, matrices with all treatment effects, and confidence limits will be printed.

seq

A character or numerical vector specifying the sequence of treatments in printouts.

backtransf

A logical indicating whether results should be back transformed in printouts and forest plots. If backtransf = TRUE, results for sm = "OR" are presented as odds ratios rather than log odds ratios, for example.

nchar.trts

A numeric defining the minimum number of characters used to create unique treatment names (see Details).

nchar.studlab

A numeric defining the minimum number of characters used to create unique study labels.

See Also

netmeta

Examples

Run this code
# \donttest{
if (requireNamespace("gemtc", quietly = TRUE)) {
library("gemtc")
# Load the example network and generate a consistency model:
model <- mtc.model(smoking, type="consistency")
results <- mtc.run(model, thin = 10)
detach("package:gemtc")

# Print results in netmeta layout
mtc <- gemtc2netmeta(results)
mtc
# SUCRAs
netrank(mtc)
# Rankogram
rankogram(mtc)
}
# }

Run the code above in your browser using DataLab