plot.mbnma: Forest plot for results from dose-response MBNMA models

Description Usage Arguments Value Examples

View source: R/mbnma-class.R

Description

Generates a forest plot for dose-response parameters.

Usage

1
2
## S3 method for class 'mbnma'
plot(x, params = NULL, agent.labs = NULL, class.labs = NULL, ...)

Arguments

x

An S3 object of class "mbnma" generated by running a dose-response MBNMA model

params

A character vector of dose-response parameters to plot. Parameters must be given the same name as monitored nodes in mbnma and must be modelled as relative effects ("rel"). Can be set to NULL to include all available dose-response parameters estimated by mbnma.

agent.labs

A character vector of agent labels (including "Placebo" if it has been included in the original network). If left as NULL (the default) then labels will be used as defined in the data.

class.labs

A character vector of class labels if mbnma was modelled using class effects (including "Placebo" if it has been included in the original network). If left as NULL (the default) then labels will be used as defined in the data.

...

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Using the triptans data
network <- mbnma.network(HF2PPITT)

# Run an exponential dose-response MBNMA and generate the forest plot
exponential <- mbnma.run(network, fun="exponential")
plot(exponential)

# Plot only Emax parameters from an Emax dose-response MBNMA
emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random")
plot(emax, params=c("d.emax"))


#### Forest plots including class effects ####
# Generate some classes for the data
class.df <- HF2PPITT
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.emax(netclass, emax="rel", ed50="rel", method="random",
            class.effect=list("ed50"="common"))

# Plot forest plot with different labels for classes
plot(emax, class.labs=c("Placebo", "Other Active", "Eletriptan"))

# Since "Placebo" is included in the network, it must be included in labels
# Failure to do so will cause an error
## ERROR ## plot(emax, class.labs=c("Other Active", "Eletriptan"))

MBNMAdose documentation built on Sept. 13, 2020, 5:08 p.m.