Learn R Programming

gemtc (version 0.1-2)

read.mtc.network: Reading GeMTC Network files

Description

The function mtc.read.network can be used to read existing GeMTC files. See http://drugis.org/gemtc for creating such files using a GUI.

Usage

read.mtc.network(file)

Arguments

file
Path to a valid GeMTC file

Value

  • Reading a network will return an object of class mtc.network. This is a list with the following elements:
  • descriptionA short description of the model
  • treatmentsA list of included treatments in the network. Treatments have an id and description.
  • dataA data frame of lists containing a study, treatment combination with an amount of responders and sample size for dichotomous networks and a mean, std.dev. and sample size for continuous networks

encoding

utf8

See Also

mtc.network, write.mtc.network

Examples

Run this code
file <- system.file("extdata/luades-smoking.gemtc", package="gemtc")
network <- read.mtc.network(file)
print(network$treatments)
##    id           description
##  A  A            No Contact
##  B  B             Self-help
##  C  C Individual Counseling
##  D  D      Group Counseling
plot(network)
summary(network)
## $Description
## [1] "MTC dataset: Smoking cessation rates"
## 
## $`Studies per treatment`
##  A  B  C  D 
## 19  6 19  6 
## 
## $`Number of n-arm studies`
## 2-arm 3-arm 
##    22     2

Run the code above in your browser using DataLab