 Welcome to the tutorial on R-Package.net meta. I'm Guido Schwadze and I'm the maintainer of the package. You will find the R-Script that I'm using here in this tutorial on Xenodo. There are two versions of the R-Package, the CRAN version and also a development version on GitHub, where we publish bug fixes and newer features. I would like to start by having a brief look on the overview page, of NetMeta. It provides frequentist methods for network meta-analysis and also supports chapter eight of our book meta-analysis with R. Here is then a listing of all the functions that are available in the package. I only would like to mention here that NetMeta providing methods for frequentist network meta-analysis is based on this paper by Gerta Rücker from 2012, which is seen here, so published in the research center of these methods. What Gerta did there is she has shown that graph theoretical methods that are routinely used for electrical networks that they also work well in network, meta-analysis, that you can get consistent treatment effects, which are estimated via the more penrose-solidol inverse of the Laplacian matrix, and this leads to the usual fixed effect or common effect model estimates. What Gerta also did here, she discussed problems of heterogeneity and consistency and provided a random effects model and described how to include multiarm trials. There is another publication on NetMeta, which has just been accepted for the Journal of Statistical Software, so in this paper we describe the workflow with NetMeta in more detail, and here I only would like to show you this diagram, so you would typically start by importing your own dataset, afterwards you would calculate all pairwise comparisons using pairwise, and then you can conduct the main analysis using NetMeta, and afterwards visualize the results in forest plots, in network graphs, and also use some functions to rank the treatments, so and this PDF file will be vignette for NetMeta, but it's not yet available at the moment. I will use in the following an example that is available in NetMeta, it's an example of a network meta-analysis on antithrombotics to prevent strokes, the patients have a non-velvular atrial fibrillation, there is a list of eight interventions, treatments that we are interested in, and the outcome of interest is the occurrence of strokes. Here I load the data and have a look at two studies, and what we can see here is first of all, the second study here is a two-arm study comparing VKase, VKase are vitamin K antagonists with placebo, and the other study is a three-arm study also comparing VKase, but also to aspirin here, and this data format is somewhat typical, so we call it the long based format, and what we can do now using pairwise is we can transform into the contrast based format that is needed by the NetMeta function, and as we have here a binary outcome, we have to see what are the mandatory arguments for a binary outcome, and we have to provide the argument treat with the information on the treatments and with the number of observations for a treatment arm and event, so in this case here the number of strokes, and those are all provided here in the first line. What we also have to provide are the study labels for a long arm based format, because otherwise we would not know which rows belong to which study, so okay. Now let's have a look here again at the same studies as before, and what we see now is let's start with the Barthov study here, we only have one row here for the two-arm study, and we still have three rows for the three-arm study, but what each of these rows contains is a pairwise comparison, so for the Barthov study the pairwise comparison is VKs against placebo, TE here is the log odds ratio, SETE is the standard error of the log odds ratio, and for the three-arm study we have all pairwise comparisons that are possible or available, and if we have a look here for example at studies with four, five, or six treatment arms, then the pairwise command would generate six, ten, or fifteen rows respectively for such studies. For some other analyses people would not like to extract or calculate all pairwise comparisons, but only comparisons to a study-specific reference, this is often called the basic parameters, and you can do this here by the argument keep all comparisons equals false, and then we can also specify a reference, and here the natural reference is placebo, if we run these commands here then we will see that now we only have two rows for the first study, and these two rows are always the comparisons to placebo, so what's missing here is the comparison VKs against aspirin, but in the following we will not use this pairwise object, but we will use the other one with all pairwise comparisons, so in the next step we will conduct the random effects network meta-analysis, first let's here define that all treatment estimates and confidence intervals will be shown with two digits, and here is then the net meta command, the first argument is our pairwise object, and we use the other arguments to define that we do only consider the random effects model, so we say the common effects model equals false, our reference is placebo or control, and we already say here that for our outcome that small values are desirable, that means we would like to to reduce the number of strokes with our treatments, and this information will be used for treatment ranking later on. If we run this command you get a warning stating that there are that comparisons with missing treatment estimates or standard errors will not be considered in our analysis, and here is also a message stating which study does not provide a treatment estimate, and if we look here at the data of this study, then we see that this is a study which had zero strokes in both groups, accordingly the odds ratio is not defined, and accordingly this study will be excluded from the analysis. So now let's have a look at the results of our network meta-analysis, the printout starts here with information on the number of included studies, pairwise comparisons, number of observations, number of treatments, and number of designs, one design for example is S-Prim compared to placebo, another design is S-Prim compared to VKAs compared to placebo and so on, so in total there are 10 different designs. Then comes the result for the random effects model, and here as we said before we are interested in comparisons to placebo, and so we have here the odds ratios for all our active treatments compared to placebo, and what we see here overall is that the treatments reduce the odds for a stroke. The largest effect is observed here for W-Gatran 150 milligram, yes okay, then let's move on and have a look at a forest plot, which contains the same information basically, and it's shown here. Later on we will present another little bit more informative forest plot, so it will not spend much time on this here. But next let's have a look here at network graphs, and the function for network graphs is the net graph function, and the standard network graph would look like this, so we see here all eight treatments in our network, and the lines correspond to where we have direct comparisons, and the thicker the line the more studies compared the treatments directly. We have here several crossings, so if we use here this Seq argument we can reduce or optimize the number of crossings, and here in the next step we say okay let's let's add also the number of studies that we have for each of these comparisons, and then we see okay there are eight studies comparing vitamin K antagonists with aspirin and so on, and then here the final, not the final, the second last command here would generate a network graph where we indicate here by the size of these points how many observations are available, how many patients are available for the individual treatments, and then in this last command here, so and we did this here with this arguments CX points, this defines the size of the points, and with the offset argument here we can specify that we would like to add some space here between the treatment labels and the actual graph, and this would be then a plot that already looks quite nice. This offset argument can be tweaked more or less easily by assigning the the net graph to a new object here called TMP, so here we go back to the first network graph where we could also do this with any of the other commands here, if we look here at the names of this new R object we see it has information on nodes and edges, nodes are here the treatments, edges are the comparisons that we have here, and then for the nodes for the treatments again there is a list of variables that we can have a look at at the current settings and also change them, and for the distance between the treatment labels and the points that we have seen before or here in these these corners, therefore we can have to look at offset X and offset Y, so the distance into the horizontal and the vertical direction, and by default we can see they are always the same, so what we could do, we could change here each value according to our needs, but here in these two commands what I only do is in the first example here I say okay add some space in the vertical direction, in the second command I say add some space in the horizontal direction, and I do this here by defining a matrix with the offset in the horizontal and in the vertical direction, let's have a look on what happens if we run these commands, so the first one adds here this this space in the vertical direction, the second one would add it in the horizontal direction, so then let's move on to the next topic and that is ranking of treatments, and the first thing is what we will do is we look at all individual ranking probabilities, and what we are using here are resampling methods, accordingly I'm using here a seed in order to get reproducible results, and if I run here this command or this this rankogram then what I get is the probabilities that any of our eight treatments is the best treatment, the second best and so on are the worst, and we immediately see here that placebo is ranked here really at the worst in almost 97% of the cases and the rest is only the seventh place, but placebo is never ranked here as the first or up to the sixth best treatment, on the other side W. Gatran 150 milligram is here clearly ranked most often as the best of these eight treatments, and okay then the next thing we can do is we can then look at cumulative ranking probabilities, so we see or look whether what is probability that a treatment is the best or the second best, the best or the second or the third best and so on, and this can be done by using an argument cumulative or cumulative probabilities here, and if we do this then we get according to the cumulative ranking probabilities, we see here in the first column the same values, but the others are then just the sum of these individual ranking probabilities here top and so on, and what is clear here is for example that our best treatment is with a probability of 100% one of the first five best treatments, we can also plot these ranking probabilities and here they are already ordered by the the surface here under the curve, so here we already can see the the ranking basically of our treatments, so this is one is the best and that one is the worst of our treatments here, and a summary of these curves is then the so-called surface under the the ranking curve, under the cumulative ranking curve, and we can get it by using the net rank function and apply it here to our rankogram object, and then we get here these values and they can be interpreted as the average proportion that any of our treatments is better than than all others, so this means here W-Gatran 150 milligram is about 94 percent on average 94 percent of the case is better than any of the other interventions, and placebo here is rather close to zero, this is the sucran, we could also do the same here not with a rankogram object but directly with our network meta-analysis object by specifying the method argument here, so this command here if I run this I get the same results but here I would have to use the seed again, okay here as you can see these are just the same results, and here the piece course this this is a ranking without resampling, we get very similar results here to the sucra values yeah which is also quite nice, and then finally as promised before we can also have here a forest plot which is sorted by decreasing sucra values, sucras are added here in this on the right side of our plot, and we compare here the best treatment with with the others this is defined here in this with these two arguments, so let's look at the plot and this would then then be yeah the final result here of of these treatment comparison or one possibility to summarize the result for for the best treatment compared to the others for example and then finally we can also produce a net leak a leak table using net leak here I will not run the command but show you this excel file which I formatted a little bit, so here in this leak table what we have is in the the bottom and the lower triangle we have the network estimates and in the upper triangle we have the direct estimates and that's it for my side thank you for your attention