rank.mbnma.predict: Rank predicted doses of different agents

Description Usage Arguments Details Value Examples

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

Description

Rank predicted doses of different agents

Usage

1
2
## S3 method for class 'mbnma.predict'
rank(x, direction = 1, rank.doses = NULL, ...)

Arguments

x

An object on which to apply the rank method

direction

Indicates whether negative responses are better (taking the value -1) or positive responses are better (taking the value 1)

rank.doses

A list of numeric vectors. Each named element corresponds to an agent (as named/coded in predict), and each number within the vector for that element corresponds to the dose for that agent. Doses of agents specified in rank.doses must be a subset of those for which responses have been predicted in predict. If left as NULL (the default) then all doses of all agents in predict will be ranked.

...

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

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

# Rank predictions from a linear dose-response MBNMA
linear <- mbnma.run(network, fun="linear")
pred <- predict(linear, E0 = 0.5)
rank <- rank(pred)
summary(rank)

# Rank selected predictions from an Emax dose-response MBNMA
emax <- mbnma.emax(network, emax="rel", ed50="rel", 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)

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