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

View source: R/mbnma-class.R

plot.mbnmaR 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 "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.

...

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"))




MBNMAdose documentation built on Aug. 8, 2023, 5:11 p.m.