# MBNMAdose outputs: Relative effects, forest plots and rankings

#### Hugo Pedder

#### 2026-06-27

For looking at outputs from MBNMAdose we will demonstrate using results from an Emax MBNMA on the triptans dataset:

    tripnet <- mbnma.network(triptans)
    #> Values for `agent` with dose = 0 have been recoded to `Placebo`
    #> agent is being recoded to enforce sequential numbering
    trip.emax <- mbnma.run(tripnet, fun = demax(emax = "rel", ed50 = "rel"))
    #> `likelihood` not given by user - set to `binomial` based on data provided
    #> `link` not given by user - set to `logit` based on assigned value for `likelihood`

## Estimating relative effects

It may be of interest to calculate relative effects between different doses of agents to obtain outputs that are more similar to those from standard NMA. A benefit of dose-response MBNMA is that relative effects between doses that have not been explored in trials can still be compared.

Relative effects can take the form of odds ratios, mean differences or rate ratios, depending on the likelihood and link function used in a model. Estimating relative effects can be particularly helpful for dose-response functions where parameter interpretation can be challenging (e.g. splines, fractional polynomials).

The `get.relative()` function allows for calculation of relative effects between any doses of agents as specified by the user. This includes doses not available in the original dataset, as these can be estimated via the dose-response relationship. Optional arguments allow for relative effects to be estimated at specific effect modifier values (if meta-regression incorporated into MBNMA model), calculation of 95% prediction intervals rather than 95% credible intervals (the default), and for the conversion of results from the log to the natural scale. The resulting relative effects can also be ranked (see Ranking for more details).

    # Specify treatments (agents and doses) for which to estimate relative effects
    treats <- list(Placebo = 0, eletriptan = 1, sumatriptan = 2, almotriptan = 1)

    # Print relative effects on the natural scale
    rels <- get.relative(trip.emax, treatments = treats, eform = TRUE)
    print(rels)
    #> ============================================================
    #> Relative treatment comparisons (95% credible intervals)
    #> ============================================================
    #>
    #>     Placebo_0      5.4 (4.7, 6.2)     4 (3.6, 4.4)     2.3 (2.1, 2.8)
    #>  5.4 (4.7, 6.2)     eletriptan_1    0.74 (0.63, 0.85) 0.44 (0.36, 0.53)
    #>   4 (3.6, 4.4)    0.74 (0.63, 0.85)   sumatriptan_2   0.59 (0.51, 0.7)
    #>  2.3 (2.1, 2.8)   0.44 (0.36, 0.53) 0.59 (0.51, 0.7)    almotriptan_1

    # Rank relative effects
    rank(rels)
    #>
    #> ================================
    #> Ranking of dose-response MBNMA
    #> ================================
    #>
    #> Includes ranking of relative effects
    #>
    #> 4 relefs ranked with negative responses being `worse`
    #>
    #> RelativeEffects ranking (from best to worst)
    #>
    #> |Treatment     | Mean| Median| 2.5%| 97.5%|
    #> |:-------------|----:|------:|----:|-----:|
    #> |eletriptan_1  |    1|      1|    1|     1|
    #> |sumatriptan_2 |    2|      2|    2|     2|
    #> |almotriptan_1 |    3|      3|    3|     3|
    #> |Placebo_0     |    4|      4|    4|     4|

`get.relative()` can also be used to compare results between two different models by specifying which model’s relative effects should be presented in the lower left diagonal (`lower.diag`) of the table, and which should be presented in the upper right diagnoal (`upper.diag`).

This can be used to compare relative effects estimated by MBNMA models fitted with different dose-response relationships, or to compare MBNMA estimates with NMA estimates.

    nma <- nma.run(tripnet)  # NMA (consistency) model
    ume <- nma.run(tripnet, UME = TRUE)  # UME (inconsistency) model

    # MBNMA consistency and NMA consistency odds ratios compared
    consistency <- get.relative(lower.diag = trip.emax, upper.diag = nma, treatments = treats,
        eform = TRUE)
    print(consistency)
    #> ============================================================
    #> Relative treatment comparisons (95% credible intervals)
    #> ============================================================
    #>
    #>     Placebo_0       5.8 (5, 6.7)     4.2 (3.8, 4.7)    2.8 (2.4, 3.2)
    #>  5.4 (4.7, 6.2)     eletriptan_1    0.73 (0.63, 0.84) 0.48 (0.39, 0.58)
    #>   4 (3.6, 4.4)    0.74 (0.63, 0.85)   sumatriptan_2   0.66 (0.56, 0.77)
    #>  2.3 (2.1, 2.8)   0.44 (0.36, 0.53) 0.59 (0.51, 0.7)    almotriptan_1

It can also be used to compare NMA or MBNMA consistency models with Unrelated Mean Effects (UME) inconsistency models. A UME model only parameterises direct comparisons within the network and so can be used to test the consistency assumption ([Checking for consistency][3-consistencychecking.html]). Note that if a UME model is fitted, comparisons for which there is no direct evidence will not have relative effects estimated for them.

    # MBNMA consistency and NMA inconsistency log-odds ratios compared
    inconsistency <- get.relative(lower.diag = trip.emax, upper.diag = ume, treatments = treats,
        eform = FALSE)
    print(inconsistency)
    #> ============================================================
    #> Relative treatment comparisons (95% credible intervals)
    #> ============================================================
    #>
    #>      Placebo_0                NA                   NA                   NA
    #>    1.7 (1.5, 1.8)        eletriptan_1              NA                0 (0, 0)
    #>    1.4 (1.3, 1.5)    -0.3 (-0.45, -0.16)     sumatriptan_2              NA
    #>    0.84 (0.72, 1)     -0.83 (-1, -0.64)   -0.53 (-0.68, -0.36)    almotriptan_1

## Forest plots

Forest plots can be easily generated from MBNMA models using the `plot()` method on an `"mbnma"` object. By default this will plot a separate panel for each dose-response parameter in the model. Forest plots can only be generated for parameters which are modelled using relative effects and that vary by agent/class.

    plot(trip.emax)

## Ranking

Rankings can be calculated for different dose-response parameters from MBNMA models by using `rank()` on an `"mbnma"` object. Any parameter monitored in an MBNMA model that varies by agent/class can be ranked. A vector of these is assigned to `params`. `lower_better` indicates whether negative responses should be ranked as “better” (`TRUE`) or “worse” (`FALSE`).

    ranks <- rank(trip.emax, lower_better = FALSE)
    print(ranks)
    #>
    #> ================================
    #> Ranking of dose-response MBNMA
    #> ================================
    #>
    #> Includes ranking of relative treatment effects from dose-response MBNMA:
    #> emax ed50
    #>
    #>
    #> 7 agents ranked with positive responses being `better`
    #>
    #> emax ranking (from best to worst)
    #>
    #> |Treatment    | Mean| Median| 2.5%| 97.5%|
    #> |:------------|----:|------:|----:|-----:|
    #> |sumatriptan  | 1.25|      1|    1|     2|
    #> |zolmitriptan | 2.19|      2|    1|     3|
    #> |eletriptan   | 2.66|      3|    2|     4|
    #> |almotriptan  | 4.80|      5|    2|     7|
    #> |naratriptan  | 5.05|      5|    4|     7|
    #> |frovatriptan | 5.80|      6|    4|     7|
    #> |rizatriptan  | 6.25|      6|    4|     7|
    #>
    #>
    #> ed50 ranking (from best to worst)
    #>
    #> |Treatment    | Mean| Median| 2.5%| 97.5%|
    #> |:------------|----:|------:|----:|-----:|
    #> |eletriptan   | 1.21|      1|    1|     2|
    #> |sumatriptan  | 2.22|      2|    1|     3|
    #> |zolmitriptan | 2.60|      3|    1|     3|
    #> |almotriptan  | 5.06|      5|    4|     7|
    #> |rizatriptan  | 5.07|      5|    4|     7|
    #> |frovatriptan | 5.72|      6|    4|     7|
    #> |naratriptan  | 6.12|      7|    4|     7|
    summary(ranks)
    #> $emax
    #>     rank.param     mean        sd 2.5% 25% 50% 75% 97.5%
    #> 1   eletriptan 2.663667 0.5656735    2   2   3   3     4
    #> 2  sumatriptan 1.247667 0.4909938    1   1   1   1     2
    #> 3 frovatriptan 5.798333 1.0727134    4   5   6   7     7
    #> 4  almotriptan 4.803333 1.1418217    2   4   5   6     7
    #> 5 zolmitriptan 2.193333 0.7502065    1   2   2   3     3
    #> 6  naratriptan 5.048000 1.0472479    4   4   5   6     7
    #> 7  rizatriptan 6.245667 0.8251514    4   6   6   7     7
    #>
    #> $ed50
    #>     rank.param     mean        sd 2.5% 25% 50% 75% 97.5%
    #> 1   eletriptan 1.214667 0.4640294    1   1   1   1     2
    #> 2  sumatriptan 2.215333 0.6343756    1   2   2   3     3
    #> 3 frovatriptan 5.724333 1.0520029    4   5   6   7     7
    #> 4  almotriptan 5.061667 1.1432262    4   4   5   6     7
    #> 5 zolmitriptan 2.596000 0.6589857    1   2   3   3     3
    #> 6  naratriptan 6.119333 1.0630787    4   5   7   7     7
    #> 7  rizatriptan 5.068667 0.8703662    4   4   5   6     7

The output is an object of `class("mbnma.rank")`, containing a list for each ranked parameter in `params`, which consists of a summary table of rankings and raw information on agent/class (depending on argument given to `level`) ranking and probabilities. The summary median ranks with 95% credible intervals can be simply displayed using `summary()`.

Histograms for ranking results can also be plotted using the `plot()` method, which takes the raw MCMC ranking results stored in `mbnma.rank` and plots the number of MCMC iterations the parameter value for each treatment was ranked a particular position.

    # Ranking histograms for Emax
    plot(ranks, params = "emax")

    # Ranking histograms for ED50
    plot(ranks, params = "ed50")

Alternatively, cumulative ranking plots for all parameters can be plotted simultaneously so as to be able to compare the effectiveness of different agents on different parameters. The surface under cumulative ranking curve (SUCRA) for each parameter can also be estimated by setting `sucra=TRUE`.

    # Cumulative ranking plot for both dose-response parameters
    cumrank(ranks, sucra = TRUE)

    #> # A tibble: 14 × 3
    #>    agent        parameter  sucra
    #>    <fct>        <chr>      <dbl>
    #>  1 eletriptan   ed50      0.420
    #>  2 eletriptan   emax      0.345
    #>  3 sumatriptan  ed50      0.374
    #>  4 sumatriptan  emax      0.419
    #>  5 frovatriptan ed50      0.127
    #>  6 frovatriptan emax      0.122
    #>  7 almotriptan  ed50      0.174
    #>  8 almotriptan  emax      0.192
    #>  9 zolmitriptan ed50      0.347
    #> 10 zolmitriptan emax      0.372
    #> 11 naratriptan  ed50      0.0986
    #> 12 naratriptan  emax      0.175
    #> 13 rizatriptan  ed50      0.174
    #> 14 rizatriptan  emax      0.0896

## References