View source: R/nodesplit.functions.R
plot.nodesplit | R Documentation |
Within a MBNMA time-course network, split contributions into direct and indirect evidence and test for consistency between them. Closed loops of treatments in which it is possible to test for consistency are those in which direct and indirect evidence are available from independent sources van Valkenhoef \insertCitevanvalkenhoef2016;textualMBNMAtime.
## S3 method for class 'nodesplit'
plot(x, plot.type = NULL, params = NULL, ...)
mb.nodesplit(
network,
comparisons = mb.nodesplit.comparisons(network),
nodesplit.parameters = "all",
fun = tpoly(degree = 1),
times = NULL,
lim = "cred",
...
)
x |
An object of |
plot.type |
A character string that can take the value of |
params |
A character vector corresponding to a time-course parameter(s) for which to plot results.
If left as |
... |
Arguments to be sent to |
network |
An object of class |
comparisons |
A data frame specifying the comparisons to be split (one row per comparison).
The frame has two columns indicating each treatment for each comparison: |
nodesplit.parameters |
A character vector of named time-course parameters on which to node-split (e.g. c("beta.1", "beta.2")). Can use "all" to split on all time-course parameters. |
fun |
An object of class |
times |
A sequence of positive numbers indicating which time points to
predict mean responses for (or at which to conduct a node-split if used with |
lim |
Specifies calculation of either 95% credible intervals ( |
The S3 method plot()
on an mb.nodesplit
object generates either
forest plots of posterior medians and 95\% credible intervals, or density plots
of posterior densities for direct and indirect evidence.
Note that by specifying the times
argument a user can perform a node-split of treatment
effects at a specific time-point. This will give the treatment effect for both direct, indirect, and
MBNMA estimates at this time point.
Plots the desired graph(s) and returns an object (or list of objects if
plot.type=NULL
) of class(c("gg", "ggplot"))
, which can be edited using ggplot
commands.
A an object of class("mb.nodesplit")
that is a list containing elements
d.X.Y
(treatment 1 = X
, treatment 2 = Y
). Each element (corresponding to each
comparison) contains additional numbered elements corresponding to each parameter in the
time-course function on which node splitting was performed. These elements then contain:
overlap matrix
MCMC results for the difference between direct and indirect evidence
p.values
Bayesian p-value for the test of consistency between direct and indirect evidence
quantiles
forest.plot
density.plot
direct
MCMC results for the direct evidence
indirect
MCMC results for the indirect evidence
plot(nodesplit)
: Plot outputs from nodesplit models
# Create mb.network object
painnet <- mb.network(osteopain)
# Identify comparisons informed by direct and indirect evidence
splits <- mb.nodesplit.comparisons(painnet)
# Fit a log-linear time-course MBNMA (takes a while to run)
result <- mb.nodesplit(painnet, comparisons=splits, nodesplit.parameters="all",
fun=tloglin(pool.rate="rel", method.rate="common"),
rho="dunif(0,1)", covar="varadj"
)
# Fit an emax time-course MBNMA with a node-split on emax parameters only
result <- mb.nodesplit(painnet, comparisons=splits, nodesplit.parameters="emax",
fun=temax(pool.emax="rel", method.emax="common",
pool.et50="rel", method.et50="common"))
# Inspect results
print(result)
summary(result)
# Plot results
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.