nma.rank: Table and Plots of Treatment Rankings

View source: R/nma.rank.R

nma.rankR Documentation

Table and Plots of Treatment Rankings

Description

Produces a SUCRA (Surface Under the Cumulative Ranking Curve) plot and table. A SUCRA table summarizes the probabilities that each treatment is the best, second best...worst treatment in the network.

Usage

nma.rank(
  nma,
  largerbetter,
  sucra.lwd = 1,
  sucra.palette = "Set1",
  ranko.palette = "Blues",
  cov.value = NULL
)

Arguments

nma

A BUGSnetRun object produced by running nma.run().

largerbetter

A boolean variable indicating whether a larger probability should indicate a more effective treatment (TRUE) or if a smaller probability should indicate a more effective treatment (FALSE).

sucra.lwd

Line width relative to the default (default=1) in the SUCRA plot.

sucra.palette

A string indicating the colour set from RcolorBrewer for the SUCRA plot. "Set1" is used by default and is automatically extended if there are many treatments in your network.

ranko.palette

A string indicating the colour set from RcolorBrewer for the rankogram. "Blues" is used by default and is automatically extended if there are many treatments in your network.

cov.value

Must be specified for meta-regression. This is the value of the covariate for which to report the results.

Value

ranktable - A rank table showing the probability of each treatment being the nth best treatment.

sucratable - A table showing the probability of each treatment being the nth best treatment or better and an overall SUCRA value for each treatment.

order - A vector containing the order of efficacy of treatments (from best to worst) based on their SUCRA value. This vector is useful for ordering treatments when creating the league heat plot with nma.league().

longtable - A long form table of ranking probabilities and SUCRA value.

sucraplot - A SUCRA plot showing the probability of each treatment being the nth best treatment or better.

rankogram - A rankogram showing the probability of each treatment being the nth best treatment.

See Also

nma.run, nma.league, nma.forest

Examples

data(diabetes.sim)

diabetes.slr <- data.prep(
  arm.data = diabetes.sim, 
  varname.t = "Treatment", 
  varname.s = "Study"
)

#Random effects, consistency model.
#Binomial family, cloglog link. This implies that the scale will be the Hazard Ratio.
diabetes.re.c <- nma.model(
  data = diabetes.slr,
  outcome = "diabetes", 
  N = "n",
  reference = "Placebo",
  family = "binomial",
  link = "cloglog",
  effects = "random",
  type = "consistency",
  time = "followup"
)
 
diabetes.re.c.res <- nma.run(
  model = diabetes.re.c,
  n.adapt = 100,
  n.burnin = 0,
  n.iter = 100
)
 
#get sucra results
sucra_results <- nma.rank(nma = diabetes.re.c.res, largerbetter = FALSE)

#plot sucra results
sucra_results$sucraplot

audrey-b/BUGSnet documentation built on Feb. 2, 2025, 5:10 p.m.