nma.regplot | R Documentation |
Produces a plot of relative treatment effects on the linear scale vs covariate values for meta-regression.
nma.regplot(nma, x.range = NULL, lwd = 1, palette = "Set1")
nma |
A |
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. |
regplot
- A plot of the relative treatment effects vs covariate values for meta-regression.
nma.run
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.