nma.compare | R Documentation |
Plots the posterior mean deviance of a consistency model vs an inconsistency model. This plot can help identify loops where inconsistency is present. Ideally, both models will contribute approximately 1 to the posterior mean deviance.
nma.compare(consistency.model.fit, inconsistency.model.fit, ...)
consistency.model.fit |
Results of |
inconsistency.model.fit |
Results of |
... |
Graphical arguments such as main=, ylab=, and xlab= may be passed in |
nma.run
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
)
#Random effects, inconsistency model.
#Binomial family, cloglog link. This implies that the scale will be the Hazard Ratio.
diabetes.re.i <- nma.model(
data = diabetes.slr,
outcome = "diabetes",
N = "n",
reference = "Placebo",
family = "binomial",
link = "cloglog",
effects = "random",
type = "inconsistency",
time = "followup"
)
diabetes.re.i.res <- nma.run(
model = diabetes.re.i,
n.adapt = 100,
n.burnin = 0,
n.iter = 100
)
# Assess model fit for a both an inconsistency model and consistency model using nma.fit()
assess.consistency <- nma.fit(diabetes.re.c.res)
assess.inconsistency <- nma.fit(diabetes.re.i.res)
#Plot the results against each other to assess inconsistency
nma.compare(assess.consistency, assess.inconsistency)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.