Title: | Precision of Treatment Hierarchy (POTH) |
---|---|
Description: | Calculate POTH for treatment hierarchies from frequentist and Bayesian network meta-analysis. POTH quantifies the certainty in a treatment hierarchy. Subset POTH, POTH residuals, and cumulative POTH can also be calculated to improve interpretation of treatment hierarchies. |
Authors: | Augustine Wigle [aut, cre, cph]
|
Maintainer: | Augustine Wigle <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2-0 |
Built: | 2025-03-02 05:35:28 UTC |
Source: | https://github.com/augustinewigle/poth |
R package poth allows to calculate the precision of treatment hierarchy (POTH) metric to quantify the uncertainty in a treatment hierarchy in network meta-analysis (Wigle et al., 2024).
R package poth provides the following methods:
Type help(package = "poth")
for a listing of R functions
available in poth.
Type citation("poth")
on how to cite poth in
publications.
The development version of poth is available on GitHub https://github.com/augustinewigle/poth.
Augustine Wigle [email protected], Guido Schwarzer [email protected]
Wigle, A., Béliveau, A., Salanti, G., Rücker, G., Schwarzer, G., Mavridis, D., Nikolakopoulou, A. (2024): Precision of Treatment Hierarchy: A Metric for Quantifying Uncertainty in Treatment Hierarchies in Network Meta-Analysis
Useful links:
Cumulative method for precision of treatment hierarchy (POTH) metric
## S3 method for class 'poth' cumul(x, sort = TRUE, ...) ## S3 method for class 'cumul.poth' print(x, digits = 3, legend = TRUE, ...) cumul(x, ...)
## S3 method for class 'poth' cumul(x, sort = TRUE, ...) ## S3 method for class 'cumul.poth' print(x, digits = 3, legend = TRUE, ...) cumul(x, ...)
x |
An R object of class |
sort |
A logical indicating whether results should be sorted by decreasing ranking metric. |
... |
Additional arguments. |
digits |
Minimal number of significant digits, see
|
legend |
A logical indicating whether a legend should be printed. |
A data frame with additional class cumul.poth
and the
following variables:
trt |
Name of added treatment. |
rank |
Treatment rank (global). |
score |
Ranking metric (global). |
poth_cum |
Cumulative POTH. |
library("netmeta") data(Senn2013) net1 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Cumulative method c1 <- cumul(poth(net1)) c1 plot(c1) plot(c1, labels = TRUE) c2 <- cumul(poth(net1), sort = FALSE) c2 plot(c2) plot(c2, labels = TRUE)
library("netmeta") data(Senn2013) net1 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Cumulative method c1 <- cumul(poth(net1)) c1 plot(c1) plot(c1, labels = TRUE) c2 <- cumul(poth(net1), sort = FALSE) c2 plot(c2) plot(c2, labels = TRUE)
Leave-one-out method for precision of treatment hierarchy (POTH) metric
## S3 method for class 'poth' loo(x, ...) loo(x, ...) ## S3 method for class 'loo.poth' print(x, digits = 3, legend = TRUE, ...)
## S3 method for class 'poth' loo(x, ...) loo(x, ...) ## S3 method for class 'loo.poth' print(x, digits = 3, legend = TRUE, ...)
x |
An R object of class |
... |
Additional arguments. |
digits |
Minimal number of significant digits, see
|
legend |
A logical indicating whether a legend should be printed. |
A data frame with additional class loo.poth
and the following
variables:
trt |
Treatment names. |
rank |
Treatment rank (global). |
score |
Ranking metric (global). |
poth_loo |
Leave-one-out POTH. |
resid |
Residuals (global POTH minus leave-one-out POTH. |
ratio |
Ratio of residual devided by absolute sum of residuals. |
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Leave-one-out method loo1 <- loo(poth(net1)) loo1
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Leave-one-out method loo1 <- loo(poth(net1)) loo1
Plot cumulative precision of treatment hierarchy (POTH) values
## S3 method for class 'cumul.poth' plot(x, labels = FALSE, nchar.trts = 4, digits = 3, ...)
## S3 method for class 'cumul.poth' plot(x, labels = FALSE, nchar.trts = 4, digits = 3, ...)
x |
R object of class |
labels |
A logical indicating whether treatment names should be shown in the plot. |
nchar.trts |
Number of characters to keep for each treatment name if labels = TRUE. |
digits |
Minimal number of significant digits for cumulative POTH, see
|
... |
Additional arguments (ignored). |
Plot results of cumulative method for precision of treatment hierarchy (POTH) metric (Wigle et al., 2024).
A ggplot2 object.
Augustine Wigle [email protected], Guido Schwarzer [email protected]
Wigle, A., Béliveau, A., Salanti, G., Rücker, G., Schwarzer, G., Mavridis, D., Nikolakopoulou, A. (2024): Precision of Treatment Hierarchy: A Metric for Quantifying Uncertainty in Treatment Hierarchies in Network Meta-Analysis
library("netmeta") data(Senn2013) net1 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Cumulative method c1 <- cumul(poth(net1)) c1 plot(c1) plot(c1, labels = TRUE) c2 <- cumul(poth(net1), sort = FALSE) c2 plot(c2) plot(c2, labels = TRUE)
library("netmeta") data(Senn2013) net1 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Cumulative method c1 <- cumul(poth(net1)) c1 plot(c1) plot(c1, labels = TRUE) c2 <- cumul(poth(net1), sort = FALSE) c2 plot(c2) plot(c2, labels = TRUE)
Plot results of leave-one-out method for precision of treatment hierarchy (POTH) metric
## S3 method for class 'loo.poth' plot(x, labels = TRUE, digits = 3, ...)
## S3 method for class 'loo.poth' plot(x, labels = TRUE, digits = 3, ...)
x |
R object of class |
labels |
A logical indicating whether treatment names should be shown in the plot. |
digits |
Minimal number of significant digits for global POTH, see
|
... |
Additional arguments (ignored). |
Plot results of leave-one-out method for precision of treatment hierarchy (POTH) metric (Wigle et al., 2024).
A ggplot2 object.
Augustine Wigle [email protected], Guido Schwarzer [email protected]
Wigle, A., Béliveau, A., Salanti, G., Rücker, G., Schwarzer, G., Mavridis, D., Nikolakopoulou, A. (2024): Precision of Treatment Hierarchy: A Metric for Quantifying Uncertainty in Treatment Hierarchies in Network Meta-Analysis
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Leave-one-out method loo1 <- loo(poth(net1)) loo1 plot(loo1) data(Senn2013) net2 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Leave-one-out method (without sorting by ranking metric) loo2 <- loo(poth(net2), sort = FALSE) loo2 plot(loo2)
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Leave-one-out method loo1 <- loo(poth(net1)) loo1 plot(loo1) data(Senn2013) net2 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Leave-one-out method (without sorting by ranking metric) loo2 <- loo(poth(net2), sort = FALSE) loo2 plot(loo2)
Precision of treatment hierarchy (POTH) is a metric to quantify the uncertainty in a treatment hierarchy in network meta-analysis
poth(x, se = NULL, small.values, pooled, trts = NULL) ## S3 method for class 'poth' print(x, sort = TRUE, digits = 3, ...) ## S3 method for class 'poth' summary(object, ...) ## S3 method for class 'summary.poth' print(x, sort = TRUE, digits = 3, ...)
poth(x, se = NULL, small.values, pooled, trts = NULL) ## S3 method for class 'poth' print(x, sort = TRUE, digits = 3, ...) ## S3 method for class 'poth' summary(object, ...) ## S3 method for class 'summary.poth' print(x, sort = TRUE, digits = 3, ...)
x |
Mandatory argument with suitable information on the treatment hierarchy (see Details). |
se |
Matrix of estimated standard errors for relative effects. |
small.values |
A character string specifying whether small
outcome values indicate a beneficial ( |
pooled |
A character string indicating whether the treatment hierarchy
is based on a common or random effects model. Either |
trts |
An optional vector with treatment names. Must match the
order of treatments provided for argument |
sort |
A logical indicating whether printout should be sorted by decreasing ranking metric. |
digits |
Minimal number of significant digits, see
|
... |
Additional arguments (ignored). |
object |
An object of class |
This function calculates the precision of treatment hierarchy (POTH) metric to quantify the uncertainty in a treatment hierarchy in network meta-analysis (Wigle et al., 2024).
Argument x
providing information on the treatment hierarchy is the
only mandatory argument. The following input formats can be provided:
vector representing a ranking metric, i.e., SUCRAs or P-scores,
square matrix with the probabilities for each possible rank (with treatments in rows and ranks in columns),
MCMC samples (with samples in rows and treatments in columns),
relative effect matrix,
R object created with netmeta
,
netrank
, or rankogram
object from R package netmeta.
Argument se
must be provided if argument x
is a matrix with
relative effects. Otherwise, argument se
is ignored.
Argument small.values
must be provided if argument x
contains
MCMC samples, relative effects, or is an object created with
netmeta
. This argument can be provided for an R
object created with netrank
or
rankogram
and is ignored otherwise.
Argument trts
is ignored for netmeta
,
netrank
, and rankogram
objects.
An object of class poth
with corresponding print
function. The object is a list containing the following components:
poth |
Separation in ranking metric. |
ranking |
A named numeric vector with rankings, i.e., SUCRAs or P-scores. |
ranking.matrix |
A square matrix with the probabilities for each possible rank (if information is available). |
pooled |
As defined above. |
Augustine Wigle [email protected], Guido Schwarzer [email protected]
Wigle, A., Béliveau, A., Salanti, G., Rücker, G., Schwarzer, G., Mavridis, D., Nikolakopoulou, A. (2024): Precision of Treatment Hierarchy: A Metric for Quantifying Uncertainty in Treatment Hierarchies in Network Meta-Analysis
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Calculate probabilities for each possible rank set.seed(1909) # make results reproducible rg1 <- rankogram(net1) rg1 # Calculate POTH s1 <- poth(rg1) s1 # Also print probabilities for each possible rank summary(s1) # Use SUCRAs to calculate POTH nr1 <- netrank(rg1) nr1 poth(nr1) poth(nr1$ranking.common) data(Senn2013) net2 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Use P-scores to calculate POTH nr2 <- netrank(net2) nr2 poth(nr2)
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Calculate probabilities for each possible rank set.seed(1909) # make results reproducible rg1 <- rankogram(net1) rg1 # Calculate POTH s1 <- poth(rg1) s1 # Also print probabilities for each possible rank summary(s1) # Use SUCRAs to calculate POTH nr1 <- netrank(rg1) nr1 poth(nr1) poth(nr1$ranking.common) data(Senn2013) net2 <- netmeta(TE, seTE, treat1.long, treat2.long, studlab, data = Senn2013, sm = "MD", random = FALSE) # Use P-scores to calculate POTH nr2 <- netrank(net2) nr2 poth(nr2)
Calculate P-scores from a set of relative effects and standard errors
pscores(TE, seTE, small.values = "desirable", trts = NULL)
pscores(TE, seTE, small.values = "desirable", trts = NULL)
TE |
Matrix of relative effects |
seTE |
Matrix of estimated standard errors for relative effects |
small.values |
A character string specifying whether small
outcome values indicate a beneficial ( |
trts |
optional; vector of treatment names matching order in TE and sds |
named vector of P-scores
Calculate a ranking probabilities matrix from MCMC samples
rankMCMC(x, small.values = "desirable", trts = NULL)
rankMCMC(x, small.values = "desirable", trts = NULL)
x |
a matrix or data.frame of MCMC samples, where rows are MCMC samples and columns are relative effects (relative to anchor) for treatments. must have column names that are the name of each treatment. |
small.values |
A character string specifying whether small
outcome values indicate a beneficial ( |
trts |
character vector of treatment names, optional if samples has column names |
A matrix of ranking probabilities where rows are treatments and columns are ranks
Calculate the local POTH for a subset of treatments
## S3 method for class 'poth' subset(x, subset, top, bottom, ...)
## S3 method for class 'poth' subset(x, subset, top, bottom, ...)
x |
An object of class |
subset |
A character vector of treatment names to consider as the set of competing treatments. |
top |
A single integer to define the number of treatments with the largest ranking metric to consider in subset. |
bottom |
A single integer to define the number of treatments with the smallest ranking metric to consider in subset. |
... |
Additional arguments (ignored). |
An R object of class poth
.
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Use P-scores to calculate local POTH for treatments "A" and "C" subset(poth(net1), subset = c("A", "C")) # Use P-scores to calculate local POTH for first three treatments subset(poth(net1), top = 3) # Use P-scores to calculate local POTH for first three treatments subset(poth(net1), bottom = 3)
library("netmeta") data(smokingcessation) p1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") net1 <- netmeta(p1, random = FALSE) # Use P-scores to calculate local POTH for treatments "A" and "C" subset(poth(net1), subset = c("A", "C")) # Use P-scores to calculate local POTH for first three treatments subset(poth(net1), top = 3) # Use P-scores to calculate local POTH for first three treatments subset(poth(net1), bottom = 3)
Data from a network meta-analysis on immune checkpoint inhibitors (ICIs) to assess the safety of ICI drugs as cancer treatment (Xu et al., 2018).
A data frame with the following columns:
studyID | study id |
treatment | treatment name |
adverse | number of adverse events |
n | group sample size |
Data were obtained from Rosenberger et al. (2021), who re-analysed the data. There are seven treatments and 23 studies. The outcome of interest is the number of treatment-related adverse events, so smaller values indicate a safer treatment.
Rosenberger, K.J., Duan, R., Chen, Y. et al. (2021): Predictive P-score for treatment ranking in Bayesian network meta-analysis. BMC Med Res Methodol 21, 213. doi:10.1186/s12874-021-01397-5
data(Xu2018) head(Xu2018) library("netmeta") pw <- pairwise(treat = treatment, event = adverse, n = n, studlab = studyID, data = Xu2018, sm = "OR") # net <- netmeta(pw, small.values = "desirable", method.tau = "REML", common = FALSE) # poth(net)
data(Xu2018) head(Xu2018) library("netmeta") pw <- pairwise(treat = treatment, event = adverse, n = n, studlab = studyID, data = Xu2018, sm = "OR") # net <- netmeta(pw, small.values = "desirable", method.tau = "REML", common = FALSE) # poth(net)