| 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 |
datatype |
A string indicating the data type. Can be |
format |
A string indicating the data format. Can be |
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.:
-
tThe treatment in each arm -
TEThe treatment effect (mean difference, log-odds) for the treatment in arm 1 versus the treatment in arm 2 -
seTEThe standard error for the treatment effect (mean difference, log-odds) for the treatment in arm 1 versus the treatment in arm 2 -
yThe mean response in each arm -
seThe standard error of the mean in each arm -
rThe number of responders in each arm -
nThe total number of participants in each arm -
fupcountFollow-up identifier -
timeThe time the data are reported -
studyIDStudy identifier
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")