rank.mbnma {MBNMAtime} | R Documentation |
Rank parameters from a time-course MBNMA
Description
Ranks desired parameters saved from a time-course MBNMA model from "best" to "worst".
Usage
## S3 method for class 'mbnma'
rank(
x,
param = "auc",
lower_better = FALSE,
treats = NULL,
int.range = NULL,
n.iter = x$BUGSoutput$n.sims,
...
)
Arguments
x |
An S3 object of |
param |
A character object containing any model parameter monitored
in |
lower_better |
Indicates whether negative responses are better ( |
treats |
A character vector of treatment/class names (depending on the parameter to be ranked) or
a numeric vector of treatment/class codes (as coded in |
int.range |
A numeric vector with two elements that indicates the range
over which to calculate AUC. Takes the form c(lower bound, upper bound). If left
as |
n.iter |
The number of iterations for which to calculate AUC (if |
... |
Arguments to be sent to |
Details
"auc"
can be specified in param
to rank treatments based on
Area Under the Curve (AUC). This accounts for the effect of multiple
time-course parameters simultaneously on the treatment response, but will
be impacted by the range of time over which AUC is calculated (int.range
).
This requires integration over int.range
and can take some time to run (particularly)
for spline functions as this uses the trapezoid method rather than adaptive quadrature).
Note that "auc"
can only be calculated at the treatment-level in class effect models.
As with other post-estimation functions, rank()
should only be performed on
models which have successfully converged. Note that rankings can be very sensitive to
even small changes in treatment effects and therefore failure to converge in only
one parameter may have substantial impact on rankings.
Value
A named list whose elements include:
-
summary.rank
A data frame containing mean, sd, and quantiles for the ranks of each treatment given intreats
-
prob.matrix
A matrix of the proportions of MCMC results for which each treatment/class intreats
ranked in which position for the given parameter -
rank.matrix
A matrix of the ranks of MCMC results for each treatment/class intreats
for the given parameter.
Examples
# Create an mb.network object from a dataset
network <- mb.network(alog_pcfb)
# Run an MBNMA model with an Emax time-course
emax <- mb.run(network,
fun=temax(pool.emax="rel", method.emax="common",
pool.et50="rel", method.et50="random"),
intercept=FALSE)
# Rank treatments by time-course parameter from the model with lower scores being better
rank(emax, param=c("emax"), lower_better=TRUE)
# Rank treatments 1-3 by AUC
rank(emax, param="auc", treats=c(1:3), lower_better=TRUE,
int.range=c(0,20))