plot.mb.rank {MBNMAtime}R Documentation

Plot histograms of rankings from MBNMA models

Description

Plot histograms of rankings from MBNMA models

Usage

## S3 method for class 'mb.rank'
plot(x, treat.labs = NULL, ...)

Arguments

x

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

treat.labs

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

...

Arguments to be sent to ggplot2::ggplot()

Value

A histogram that shows rankings for each treatment/agent/prediction. The object returned is an object of class c("gg", "ggplot").

Examples


# Create an mb.network object from a dataset
painnet <- mb.network(osteopain)

# Run an MBNMA model with an Emax time-course
emax <- mb.run(painnet,
  fun=temax(pool.emax="rel", method.emax="common",
    pool.et50="abs", method.et50="random"),
  positive.scale=TRUE)

# Calculate treatment rankings for AUC and emax
ranks <- rank(emax,
  param=c("auc"),
  int.range=c(0,15), n.iter=500)

# Plot histograms for ranking by AUC
plot(ranks)



[Package MBNMAtime version 0.2.4 Index]