--- title: "crossnma: Cross-Design & Cross-Format Network Meta-Analysis and Regression" author: "Tasnim Hamza, Guido Schwarzer and Georgia Salanti" output: rmarkdown::pdf_document: number_sections: true rmarkdown::html_vignette: toc: true number_sections: true bibliography: references.bib vignette: > %\VignetteIndexEntry{crossnma: Cross-Design & Cross-Format Network Meta-Analysis and Regression} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", message = TRUE, warning = FALSE ) options(knitr.kable.NA = ".") ``` ```{r setup, message = FALSE, echo = FALSE} library("crossnma") set.seed(1910) settings.meta(digits = 3) cilayout("(", " to ") ``` # Introduction In network meta-analysis we synthesize all relevant available evidence about health outcomes from competing treatments. That evidence might come from different study designs and in different formats: from non-randomized studies (NRS) or randomized controlled trials (RCT) as individual participant data (IPD) or as aggregate data (AD). We set up the package **crossnma** to synthesize all available evidence for a binary outcome with the odds ratio as effect measure. This document demonstrates how to use **crossnma** to synthesize cross-design evidence and cross-format data via Bayesian network meta-analysis and meta-regression (NMA and NMR). All models are implemented in JAGS [@plummer_jags]. We describe the workflow within the package using a worked example from a network meta-analysis of studies for treatments in relapsing remitting multiple sclerosis (RRMS). The primary outcome is the occurrence of relapses in two years (binary outcome). In the analysis, the relative effect will be the odds ratio (OR). The aim is to compare the efficacy of four treatments using the data from 6 different studies in different formats and different designs. # The synthesis models We first introduce the model that synthesizes studies with individual-level (IPD) or/and aggregate data (AD) ignoring their design (unadjusted synthesis). Then, we present three possible models that account for the different study designs. In the table below we set the notation that will be used in the description of the four synthesis models. | Notation | Description | Argument in `crossnma.model()` | |:---------- |:---------- | :---------- | |$i=1, ..., np_j$ | participant id| | |$j=1, ..., ns$ | study id| `study` | |$k=1, ..., K$ | treatment index| `trt` | |$ns_{IPD}, ns_{AD}, ns_{RCT}, ns_{NRS}$| the number of studies. The index refers to the design or format of the study| | |$y_{ijk}$ | binary outcome (0/1)| `outcome` | |$p_{ijk}$ | probability of the event to occur| | |$r_{jk}$ | the number of events per arm| `outcome` | |$n_{jk}$ | the sample size per arm| `n` | |$b$ |the study-specific reference|*| |$u_{jb}$ | The treatment effect of the study-specific reference $b$ when $x_{ijk}=\bar{x}_{j}=0$ | | |$\delta_{jbk}$|log(OR) of treatment $k$ relative to $b$|| |$x_{ijk}$|the covariate|`cov1`, `cov2`, `cov3`| |$\bar{x}_{j}$|the mean covariate for study $j$|| |$d_{Ak}$| the basic parameters. Here, $d_{AA}=0$ when A is set as the reference in the network|use `reference` to assign the reference treatment| |$z_j$| study characteristics to estimate the bias probability $\pi_j$| `bias.covariate` | |$w$| common inflation factor of variance for the NRS estimates | the element `var.infl` in `run.nrs`| |$\zeta$| common mean shift of the NRS estimates | the element `mean.shift` in `run.nrs`| *The study-specific reference $b$ is assigned automatically to be the network reference for studies that have the network reference treatment. If not, it is assigned to the first alphabetically ordered treatment on the study. ## Unadjusted network meta-regression (NMR) We synthesize the evidence from RCT and NRS without acknowledging the differences between them. We combine the IPD data from RCT and NRS in one model and we do the same in another model with the AD information. Then, we combine the estimates from both parts as described in Section 2.5. **NMR model for IPD studies** $$ y_{ijk} \sim Bernoulli(p_{ijk}) $$ \begin{equation} logit(p_{ijk}) = \begin{cases} u_{jb} +\beta_{0j} x_{ijk} & \text{if $k=b$}\\ u_{jb} +\delta_{jbk} + \beta_{0j}x_{ijk}+\beta^w_{1,jbk}x_{ijk} + (\beta^B_{1,jbk}-\beta^w_{1,jbk}) \bar{x}_{j} & \text{if $k\ne b$} \end{cases} \end{equation} **NMR model for AD studies** $$ r_{jk} \sim Binomial(p_{.jk},n_{jk}) $$ \begin{equation} logit(p_{.jk}) = \begin{cases} u_{jb} & \text{if $k=b$}\\ u_{jb} +\delta_{jbk} +\beta^B_{1,jbk} \bar{x}_{j} & \text{if $k\ne b$} \end{cases} \end{equation} ## Using non-randomized studies (NRS) to construct priors for the treatment effects First, the (network) meta-regression with only NRS data estimates the relative treatment effects with posterior distribution of mean $\tilde{d}^{NRS}_{Ak}$ and variance $V^{NRS}_{Ak}$ (use `run.nrs` in `crossnma.model()` to control this process). The posteriors of NRS results are then used as priors for the corresponding basic parameters in the RCT model, $d_{Ak} \sim \mathcal{N}(\tilde{d}^{NRS}_{Ak},V^{NRS}_{Ak})$. We can adjust for potential biases associated with NRS by either shifting the mean of the prior distribution with a bias term $\zeta$ or by dividing the prior variance with a common inflation factor $w, 0