rank.mbnma: Rank parameter estimates

Description Usage Arguments Details Value Examples

View source: R/mbnma-class.R

Description

Only parameters that vary by agent/class can be ranked.

Usage

1
2
## S3 method for class 'mbnma'
rank(x, params = NULL, direction = 1, level = "agent", to.rank = NULL, ...)

Arguments

x

An object on which to apply the rank method

params

A character vector of named parameters in the model that vary by either agent or class (depending on the value assigned to level). If left as NULL (the default), then ranking will be calculated for all available parameters that vary by agent/class.

direction

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

level

Can be set to "agent" to rank across different agents or "class" to rank across different classes.

to.rank

A numeric vector containing the codes for the agents/classes you wish to rank. If left NULL then all agents/classes (depending on the value assigned to level) in the model will be ranked. Included codes must be greater than 2 if placebo has been modelled, since placebo cannot be included in the ranking

...

Arguments to be passed to methods

Details

Ranking cannot currently be performed on non-parametric dose-response MBNMA

Value

An object of class("mbnma.rank") which is a list containing a summary data frame, a matrix of rankings for each MCMC iteration, a matrix of probabilities that each agent has a particular rank, and a matrix of cumulative ranking probabilities for each agent, 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
24
25
26
27
28
29
30
31
32
33
# Using the triptans data
network <- mbnma.network(HF2PPITT)

# Rank selected agents from a linear dose-response MBNMA
linear <- mbnma.run(network, fun="linear")
ranks <- rank(linear, to.rank=c("zolmitriptan", "eletriptan", "sumatriptan"))
summary(ranks)

# Rank only ED50 parameters from an Emax dose-response MBNMA
emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random")
ranks <- rank(emax, params="d.ed50")
summary(ranks)


#### Ranking by class ####
# Generate some classes for the data
class.df <- HF2PPITT
class.df$class <- ifelse(class.df$agent=="placebo", "placebo", "active1")
class.df$class <- ifelse(class.df$agent=="eletriptan", "active2", class.df$class)
netclass <- mbnma.network(class.df)
emax <- mbnma.emax(netclass, emax="rel", ed50="rel", method="random",
            class.effect=list("ed50"="common"))

# Rank by class, with negative responses being "better"
ranks <- rank(emax, level="class", direction=-1)
print(ranks)

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

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

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