plot.mbnma.rank: Plot histograms of rankings from MBNMA models

Description Usage Arguments Value Examples

View source: R/mbnma.rank-class.R

Description

Plot histograms of rankings from MBNMA models

Usage

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

Arguments

x

An object of class "mbnma.rank" generated by rank.mbnma()

params

A character vector of named parameters in the model that vary by either agent or class (depending on the value assigned to level). If left as NULL (the default), then ranking will be calculated for all available parameters that vary by agent/class.

treat.labs

A vector of treatment labels in the same order as treatment codes. Easiest to use treatment labels stored by mbnma.network()

...

Arguments to be sent to ggplot::geom_bar()

Value

A series of histograms that show rankings for each treatment/agent/prediction, with a separate panel for each parameter The object returned is a list containing a separate element for each parameter in params which is an object of class(c("gg", "ggplot")).

Examples

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

# Estimate rankings  from an Emax dose-response MBNMA
emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random")
ranks <- rank(emax)

# Plot rankings for both dose-response parameters (in two separate plots)
plot(ranks)

# Plot rankings just for ED50
plot(ranks, params="d.ed50")

# Plot rankings from prediction
doses <- list("eletriptan"=c(0,1,2,3), "rizatriptan"=c(0.5,1,2))
pred <- predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)",
            exact.doses=doses)
rank <- rank(pred)
plot(rank)

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