plot.mbnma {MBNMAdose} | R Documentation |
Forest plot for results from dose-response MBNMA models
Description
Generates a forest plot for dose-response parameters.
Usage
## S3 method for class 'mbnma'
plot(x, params = NULL, ...)
Arguments
x |
An S3 object of class |
params |
A character vector of dose-response parameters to plot.
Parameters must be given the same name as monitored nodes in |
... |
Arguments to be passed to methods, such as graphical parameters |
Value
A forest plot of class c("gg", "ggplot")
that has separate panels for
different dose-response parameters. Results are plotted on the link scale.
Examples
# Using the triptans data
network <- mbnma.network(triptans)
# Run an exponential dose-response MBNMA and generate the forest plot
exponential <- mbnma.run(network, fun=dexp())
plot(exponential)
# Plot only Emax parameters from an Emax dose-response MBNMA
emax <- mbnma.run(network, fun=demax(), method="random")
plot(emax, params=c("emax"))
#### Forest plots including class effects ####
# Generate some classes for the data
class.df <- triptans
class.df$class <- ifelse(class.df$agent=="placebo", "placebo", "active1")
class.df$class <- ifelse(class.df$agent=="eletriptan", "active2", class.df$class)
netclass <- mbnma.network(class.df)
emax <- mbnma.run(netclass, fun=demax(), method="random",
class.effect=list("ed50"="common"))
[Package MBNMAdose version 0.4.3 Index]