nma.regplot: Plot of relative treatment effects vs covariate values for...

View source: R/nma.regplot.R

nma.regplotR Documentation

Plot of relative treatment effects vs covariate values for meta-regression.

Description

Produces a plot of relative treatment effects on the linear scale vs covariate values for meta-regression.

Usage

nma.regplot(nma, x.range = NULL, lwd = 1, palette = "Set1")

Arguments

nma

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

x.range

The range of the x axis (covariate values). By default, the range will be the same as in the data.

lwd

Line width relative to the default (default=1).

palette

A string indicating the colour set from RcolorBrewer for the plot. "set1" is great, but you may need a different colour set if there are many treatments in your network.

Value

regplot - A plot of the relative treatment effects vs covariate values for meta-regression.

See Also

nma.run

Examples

data(afib)

afib.slr <- data.prep(arm.data = afib,
varname.t = "treatment",
varname.s = "study")

#Random effects, consistency model.
#Binomial family, cloglog link. This implies that the scale will be the Hazard Ratio.
afib.re.c <- nma.model(
  data = afib.slr,
  outcome = "events",
  N = "sampleSize",
  reference = "02",
  family = "binomial",
  link = "logit",
  effects = "random",
  covariate = "stroke",
  prior.beta = "EXCHANGEABLE"
)
 
afib.re.c.res <- nma.run(
  model = afib.re.c,
  n.adapt = 100,
  n.burnin = 0,
  n.iter = 100)

nma.regplot(afib.re.c.res)

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