Description Usage Arguments Value References Examples
View source: R/nodesplit.network.R
This function makes a network object that can be used to run network metaanalysis using nodesplit.network.run
.
User needs to specify Outcomes, Study, Treat, N or SE, and response.
Prior parameters are filled in automatically based on the data type if not specified.
The input data should be armlevel so that we have observations for each treatment in each study.
The input data is preprocessed to fit the format necessary to run model in JAGS.
1 2 3 4 5 6 7 8 9 10 11 12 
Outcomes 
Armlevel outcomes. If it is a multinomial response, the matrix would have dimensions treatment arms (row) by multinomial categories (column). If it is binomial or normal, it would be a vector. 
Study 
A vector of study indicator for each arm 
Treat 
A vector of treatment indicator for each arm 
N 
A vector of total number of observations in each arm. Used for binomial and multinomial responses 
SE 
A vector of standard error for each arm. Used only for normal response 
response 
Specification of the outcomes type. Must specify one of the following: "normal", "binomial", or "multinomial" 
Treat.order 
Treatment order which determines how treatments are compared. The first treatment that is specified is considered to be the baseline treatment. Default order is alphabetical. If the treatments are coded 1, 2, etc, then the treatment with a value of 1 would be assigned as a baseline treatment. 
pair 
Define a pair to split. It has to be a vector of length 2 with treatment names 
type 
Type of model fitted: either "random" for random effects model or "fixed" for fixed effects model. Default is "random". 
dic 
This is an indicator for whether user wants to calculate DIC. Model stores less information if you set it to FALSE. Default is set to FALSE. 
Creates list of variables that are used to run the model using nodesplit.network.run
data 
Data combining all the input data. User can check this to insure the data is correctly specified. For modelling purposes, character valued studies or treatment variables are changed to numeric values based on alphabetical order. 
nrow 
Total number of arms in the metaanalysis 
ncat 
Number of columns in the Outcomes. Will equal 1 for binary and normal and number of categories for multinomial 
nstudy 
Number of study 
na 
Number of arms for each study 
ntreat 
Number of treatment 
b.id 
Indicator in sequence of all treatments for which treatment is base treatment in Study 
t 

r 

code 
Rjags model file code that is generated using information provided by the user. To view model file inside R in a nice format, use 
S. Dias, N.J. Welton, D.M. Caldwellb, A.E. Ades (2010), Checking consistency in mixed treatment, Statistics in Medicine 29(78, Sp. Iss. SI): 932944. doi: 10.1002/sim.3767
1 2 3 4 5  ###Thrombolytic data example
network < with(thrombolytic,{
nodesplit.network.data(Outcomes, Study, Treat, N, response = "binomial", pair = c(3,9))
})
network

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.