Learn R Programming

gemtc (version 0.1-1)

mtc.network: Create an mtc.network

Description

Creates an object of class mtc.network

Usage

mtc.network(description, treatments, data)

Arguments

description
Optional. Short description of the network.
treatments
Optional. A data frame with columns `id' and `description' defining the treatments. Alternatively, a list where each element is a labeled vector defining a single treatment.
data
A data frame defining the arms of each study, containing the columns `study' and `treatment', where `treatment' must refer to an existing treatment ID if treatments were specified. To specify a network with dichotomous data, the number of responders shoul

Value

  • A object of the class mtc.network

encoding

utf8

See Also

read.mtc.network

Examples

Run this code
treatments <- list(c('id' = 'A', 'description' = 'Treatment A'),
                   c('id' = 'B', 'description' = 'Treatment B'),
                   c('id' = 'C', 'description' = 'Treatment C'))
data <- list(
   c('study' = '01', 'treatment' = 'A', 'responders' = 2, 'sampleSize' = 100),
   c('study' = '01', 'treatment' = 'B', 'responders' = 5, 'sampleSize' = 100),
   c('study' = '02', 'treatment' = 'B', 'responders' = 6, 'sampleSize' = 110),
   c('study' = '02', 'treatment' = 'C', 'responders' = 1, 'sampleSize' = 110),
   c('study' = '03', 'treatment' = 'A', 'responders' = 3, 'sampleSize' = 60),
   c('study' = '03', 'treatment' = 'C', 'responders' = 4, 'sampleSize' = 80),
   c('study' = '03', 'treatment' = 'B', 'responders' = 7, 'sampleSize' = 80))
network <- mtc.network("Example", treatments, data)
plot(network)

Run the code above in your browser using DataLab