Sponsors

GeMTC: mixed treatment comparison model generation

GeMTC generates Mixed Treatment Comparison (MTC) (in-)consistency models that can be run using JAGS, OpenBUGS or WinBUGS. GeMTC is written and maintained by Gert van Valkenhoef.

Citing GeMTC

If you use GeMTC in your work and you would to cite us, please cite the following reference:

  • G. van Valkenhoef, T. Tervonen, B. de Brock, H. Hillege, "Algorithmic Parameterization of Mixed Treatment Comparisons", In Statistics and Computing, in press, 2011. [bib] [doi] [preprint]

Please note that a more appropriate paper is under review, so check back here for an updated reference.

Prior to version 0.10, GeMTC was known as "the drugis.org MTC library" and primarily aimed at integration in ADDIS. Since the name change, GeMTC is available in two forms: a newly developed Graphical User Interface (GUI) for interactive use and the Command Line Interface (CLI) for use in scripted automation. A third form, an R package, is under development and available as an experimental package.

GeMTC is used in ADDIS to automatically generate and run network meta-analyses. ADDIS is the easiest way to try out our MTC software, as it automates not only model generation but also the running of the models. GeMTC is intended for those who want to run their own analyses in the MCMC software of their choice.

Like all our software, GeMTC is open source. See our information for developers for how to get the source code, and how to use GeMTC from your own (Java) application. See historical versions for older versions of GeMTC and its predecessor.

GeMTC Graphical User Interface (GUI)

To run the GeMTC GUI, download the ZIP archive and unpack it. Then just double-click the 'gemtc-gui-0.12.2.jar' file. The ZIP archive also includes a number of example datafiles that you can now open using the 'Open' button on the toolbar. If the program does not start, you likely do not have a recent version of the Java runtime environment. Get it from java.com.

The GeMTC GUI enables the easy management of MTC datasets in the GeMTC format (.gemtc, based on XML). In the current version, it is assumed that arm-based data are available; it is not yet possible to use contrast-based data with GeMTC.

Managing data.

Once the dataset has been created, different MTC models can be generated: consistency or inconsistency models, for running in either BUGS or JAGS. Node-split models are being worked on and currently disabled in the GUI application (see the CLI application for experimental node-split functionality). Just click the 'Generate' button and you will be prompted to specify what kind of model should be generated. The number of chains, dispersion of the initial values, length of the tuning (adaptive) phase and the simulation phase can be configured.

Model parameters.

After the details have been entered, the appropriate model will be generated automatically. For users of the WinBUGS or OpenBUGS GUI applications, the contents of the model, data, and initial values text can be copy/pasted into WinBUGS/OpenBUGS. Those who use the OpenBUGS or JAGS command line programs should use the 'Save' button and choose a directory in which to save the generated files. They can use the '.script' file to run the model as specified.

Generated model.

You can then use your MCMC software of choice to estimate the model. If you use JAGS and R, the 'mtc.R' file included in the ZIP archive can help to assess convergence (using gelman.diag) and generate summary tables.

GeMTC Command Line Interface (CLI)

The GeMTC CLI is useful for those who want a more automated way of generating MTC models. It may actually be useful to use it in conjuction with the GUI, which can be used to edit the data files.

In addition to having Java installed, as is needed for the GUI, you also need to have Java "on the path" of your command shell. Use the 'java -version' command to check this:

gert@gamma:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2)
OpenJDK Server VM (build 19.0-b09, mixed mode)

If you get an error (like "command not found"), you need to configure your PATH. Oracle has instructions for Windows users.

Then (assuming gemtc-cli-0.12.2.jar is in the working directory), use 'java -jar gemtc-cli-0.12.2.jar' to check that GeMTC CLI is working, and see the documentation of the available options:

gert@gamma:~$ java -jar gemtc-cli-0.12.2.jar 
1 or 2 non-option arguments expected, got 0

Usage: java -jar ${MTC_JAR} \
      [--type=consistency|inconsistency|nodesplit] \
      [--scale=<f>] [--tuning=<n>] [--simulation=<m>] \
      [--bugs] [--suppress] \
      <datafile> [<output>]
When unspecified, the default is --type=consistency --scale=2.5
   --tuning=20000 --simulation=40000  ${%.gemtc}.

This will generate a JAGS or BUGS model from the specified GeMTC
datafile.

To generate a model for the smoking cessation dataset included with the ZIP archive (again, assuming the data file is in the working directory), simply run:

gert@gamma:~$ java -jar gemtc-cli-0.12.2.jar luades-smoking.gemtc 
Evidence graph:
	graph {
		C -- D
		A -- D
		B -- C
		A -- B
		B -- D
		A -- C
	}
Identified spanning tree:
	graph {
		A -- C
		A -- D
		A -- B
	}
Writing JAGS scripts: luades-smoking.cons.*

This has printed some information about the evidence structure and the generated model (these can be rendered using Graphviz). And, more importantly, the generated model files have been saved to the current directory. We can now use JAGS to run them:

gert@gamma:~$ jags luades-smoking.cons.script 
Welcome to JAGS 1.0.4 on Thu Sep 22 10:48:23 2011
JAGS is free software and comes with ABSOLUTELY NO WARRANTY
Loading module: basemod
Loading module: bugs
Reading data file luades-smoking.cons.data
Compiling model graph
   Resolving undeclared variables
   Allocating nodes
   Graph Size: 453
Reading parameter file luades-smoking.cons.inits1
Reading parameter file luades-smoking.cons.inits2
Reading parameter file luades-smoking.cons.inits3
Reading parameter file luades-smoking.cons.inits4
Adapting 20000
---------------------------------------| 20000
++++++++++++++++++++++++++++++++++++++++ 100%
Updating 40000
---------------------------------------| 40000
**************************************** 100%

GeMTC R Package

An experimental R package is now available. You need a working installation of JAGS 1.0.x, and the R packages rjags (1.0.x) and rJava. See

library(mtc)
?mtc

in R for documentation. Contact Gert for support and feature requests. Please note that as yet, the package has only been tested on Ubuntu 10.04 LTS.

Information for developers

Source code access is interesting for developers and researchers. Please note that GeMTC is implemented partially in Scala and partially in Java. There is also an R interface.

The source code is available from github.com/gertvv/mtc.

It is possible to use GeMTC as a library to provide MTC functionality in your own application. See ADDIS for an example of this.

Historical versions

Here we provide links to downloadable previous versions of GeMTC.

GeMTC

The drugis.org MTC library