Learn R Programming

MBNMAdose (version 0.5.0)

rank.relative.array: Rank relative effects obtained between specific doses

Description

Ranks "relative.table" objects generated by get.relative().

Usage

# S3 method for relative.array
rank(x, lower_better = TRUE, ...)

Value

An object of class("mbnma.rank") which is a list containing a summary data frame, a matrix of rankings for each MCMC iteration, and a matrix of probabilities that each agent has a particular rank, for each parameter that has been ranked.

Arguments

x

An object on which to apply the rank method

lower_better

Indicates whether negative responses are better (TRUE) or positive responses are better (FALSE)

...

Arguments to be passed to methods

Examples

Run this code
# \donttest{
# Using the triptans data
network <- mbnma.network(triptans)

# Rank selected predictions from an Emax dose-response MBNMA
emax <- mbnma.run(network, fun=demax(), method="random")
rels <- get.relative(emax)
rank <- rank(rels, lower_better=TRUE)

# Print and generate summary data frame for `mbnma.rank` object
summary(rank)
print(rank)

# Plot `mbnma.rank` object
plot(rank)
# }

Run the code above in your browser using DataLab