mb.make.contrast {MBNMAtime}R Documentation

Convert arm-based MBNMA data to contrast data

Description

Converts an object of class mb.network from arm-based long MBNMA data to a data frame with contrast data (a separate contrast for each treatment comparison at each time point within each study). Data can be either long or wide.

Usage

mb.make.contrast(network, datatype = NULL, format = "wide")

Arguments

network

An object of class mb.network

datatype

A string indicating the data type. Can be binomial or normal

format

A string indicating the data format. Can be wide (two additional columns for each variable - contrast arms) or long.

Value

A data frame with the following columns. In wide format, some columns are given the indices 1 and 2 to indicate each arm in a given treatment comparison.:

Examples

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

# Convert to wide contrast data
mb.make.contrast(network, format="wide")

# Convert to long contrast data
mb.make.contrast(network, format="long")

[Package MBNMAtime version 0.2.4 Index]