rank.mbnma.predict {MBNMAdose} | R Documentation |
Rank predicted doses of different agents
Description
Ranks predictions at different doses from best to worst.
Usage
## S3 method for class 'mbnma.predict'
rank(x, lower_better = TRUE, rank.doses = NULL, ...)
Arguments
x |
An object on which to apply the rank method |
lower_better |
Indicates whether negative responses are better ( |
rank.doses |
A list of numeric vectors. Each named element corresponds to an
agent (as named/coded in |
... |
Arguments to be passed to methods |
Details
If predict
contains multiple predictions at dose=0, then only the first of these
will be included, to avoid duplicating rankings.
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.
Examples
# Using the triptans data
network <- mbnma.network(triptans)
# Rank all predictions from a log-linear dose-response MBNMA
loglin <- mbnma.run(network, fun=dloglin())
pred <- predict(loglin, E0 = 0.5)
rank <- rank(pred)
summary(rank)
# Rank selected predictions from an Emax dose-response MBNMA
emax <- mbnma.run(network, fun=demax(), method="random")
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,
rank.doses=list("eletriptan"=c(0,2), "rizatriptan"=2))
# Print and generate summary data frame for `mbnma.rank` object
summary(rank)
print(rank)
# Plot `mbnma.rank` object
plot(rank)