createC: Auxiliary functions for component network meta-analysis

View source: R/createC.R

createCR Documentation

Auxiliary functions for component network meta-analysis

Description

Auxiliary functions to (i) create a combination / C matrix with information on treatment combinations and interaction terms and (ii) a vector with all combinations in a component network meta-analysis.

Usage

createC(x, ...)

## S3 method for class 'matrix'
createC(
  x,
  comb.ia,
  inactive = NULL,
  sep.comps = gs("sep.comps"),
  sep.ia = gs("sep.ia"),
  ...
)

## S3 method for class 'netcomb'
createC(x, comb.ia = NULL, inactive = NULL, sep.ia = x$sep.ia, ...)

## S3 method for class 'netmeta'
createC(x, inactive = NULL, sep.comps = gs("sep.comps"), ...)

## S3 method for class 'netconnection'
createC(x, inactive = NULL, sep.comps = gs("sep.comps"), ...)

## Default S3 method:
createC(x, n = 1, ...)

combinations(x, n = NULL)

Arguments

x

A netcomb, netmeta or netconnection object, a matrix or the number of components.

...

Additional arguments.

comb.ia

A character vector specifying treatment combinations which will be considered as interactions.

inactive

A character string defining the inactive treatment component (see netcomb).

sep.comps

A single character to define separator between treatment components.

sep.ia

A single character to define separator for interactions.

n

A single number specifying the number of components in combinations.

Value

R function createC returns a combination matrix / C matrix with studies in rows and component and interaction terms in columns.

R function combinations returns a character vector with combinations.

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de, Gerta Rücker gerta.ruecker@uniklinik-freiburg.de

See Also

netcomb, discomb

Examples


data(Linde2016)

# Conduct random effects network meta-analysis
#
net1 <- netmeta(lnOR, selnOR, treat1, treat2, id,
  data = Linde2016, ref = "placebo", sm = "OR", common = FALSE)

# Additive component network meta-analysis (with placebo as inactive
# treatment)
#
nc1 <- netcomb(net1, inactive = "placebo")

# Available combinations in CNMA
combinations(nc1)

# Create C matrix with all available interactions, i.e., one interaction
# for each combination
createC(nc1)

# Run interaction CNMA model with all available interactions
# (same result as standard NMA)
netcomb(net1, C.matrix = createC(nc1))



netmeta documentation built on April 3, 2025, 6:12 p.m.