Title: | Visualize Multi-Component Interventions in Network Meta-Analysis |
---|---|
Description: | A set of functions providing several visualization tools for exploring the behavior of the components in a network meta-analysis of multi-component (complex) interventions: - components descriptive analysis - heat plot of the two-by-two component combinations - leaving one component combination out scatter plot - violin plot for specific component combinations' effects - density plot for components' effects - waterfall plot for the interventions' effects that differ by a certain component combination - network graph of components - rank heat plot of components for multiple outcomes. The implemented tools are described by Seitidis et al. (2023) <doi:10.1002/jrsm.1617>. |
Authors: | Georgios Seitidis [aut, cre] , Sofia Tsokani [aut] , Christos Christogiannis [aut], Katerina Maria Kontouli [aut], Alexandros Fyraridis [aut], Stavros Nikolakopoulos [aut] , Areti Angeliki Veroniki [aut] , Dimitris Mavridis [aut] |
Maintainer: | Georgios Seitidis <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.0 |
Built: | 2024-11-08 04:14:30 UTC |
Source: | https://github.com/georgiosseitidis/viscomp |
The function performs a descriptive analysis regarding the frequency of the components in the network meta-analysis model.
compdesc(model, sep = "+", heatmap = TRUE, percentage = TRUE, digits = 2)
compdesc(model, sep = "+", heatmap = TRUE, percentage = TRUE, digits = 2)
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
heatmap |
|
percentage |
|
digits |
A single integer value that specifies the percentages' decimal places in the |
A list containing three items
crosstable |
A cross-table containing the frequency of the components. Each cell represents the number of arms where the corresponding component combination was observed. |
frequency |
A
|
heatmat |
An object of class |
The function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) compdesc(model = nmaMACE)
data(nmaMACE) compdesc(model = nmaMACE)
The Components Network Graph is meant to visualize the frequency of components’ combinations found in the network.
compGraph( model, sep = "+", mostF = 5, excl = NULL, title = "Most frequent combinations of components", print_legend = TRUE, size_legend = 0.825 )
compGraph( model, sep = "+", mostF = 5, excl = NULL, title = "Most frequent combinations of components", print_legend = TRUE, size_legend = 0.825 )
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
mostF |
Number of most frequent combinations of the network. |
excl |
A character vector that specifies the combinations to be excluded from the plot. |
title |
A single character that specifies the overall title of the plot. |
print_legend |
|
size_legend |
size of the legend. |
The function resembles a network plot where nodes represent the individual components found in the network
and edges represent the combination of components found in at least one treatment arm of the trials included in the
network meta-analysis model. Each edge’s color represents one of the unique interventions (components’ combination)
found in the network of interventions. Edges’ thickness indicates the frequency by which each intervention
(combination of components) was observed in the network (number of arms in which the combination was assigned).
The number of the most frequent combinations can be modified from the argument mostF
. The function by
default plots the five most frequent components' combinations found in the network.
Returns (invisibly) a qgraph
object.
The function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) compGraph(model = nmaMACE)
data(nmaMACE) compGraph(model = nmaMACE)
The function creates density plots in order to explore the efficacy of the components.
denscomp( model, sep = "+", combination, violin = FALSE, random = TRUE, z_value = FALSE )
denscomp( model, sep = "+", combination, violin = FALSE, random = TRUE, z_value = FALSE )
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
combination |
A character vector that contains the component combinations of interest. |
violin |
|
random |
|
z_value |
|
If the length of the argument combination
is 1, the function creates two density plots. The first is produced based on the
interventions that include the component combination of interest (which is specified by the argument combination
),
while the second on the interventions that do not include the underlying component combination.
If the argument combination
includes more than one elements, the number of densities is equal with the length of
the argument combination
, and each density is based on the interventions that include the relative component combination.
For example, if combination = c("A + B", "B + C", "A")
the function will produce 3 density plots that are based on
the interventions that includes components "A"
and "B"
, the interventions that include components "B"
and "C"
and
interventions that includes component "A"
, respectively.
The function by default uses the intervention's relative effects (z_value = FALSE
) obtained from the random-effects network
meta-analysis (NMA) model (random = TRUE
). It can be also adjusted to use the intervention's z-values
instead of the relative effects, by setting z_value = TRUE
.
An object of class ggplot
.
The efficacy of the components could be explored via violins plots instead of density plots, by setting violin = TRUE
.
Also, in the case of dichotomous outcomes, the log-scale is used.
The function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) denscomp(model = nmaMACE, combination = "C")
data(nmaMACE) denscomp(model = nmaMACE, combination = "C")
The function creates a heat plot based on the two-by-two component combinations, obtained from the network meta-analysis (NMA) model.
heatcomp( model, sep = "+", median = TRUE, random = TRUE, z_value = FALSE, freq = TRUE, legend_name = NULL )
heatcomp( model, sep = "+", median = TRUE, random = TRUE, z_value = FALSE, freq = TRUE, legend_name = NULL )
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
median |
|
random |
|
z_value |
|
freq |
|
legend_name |
A single character that specifies the title of the legend. |
Diagonal elements refer to components, while off-diagonal to components' combinations. Each element summarizes by default
the NMA relative effects (z_value = FALSE
) of the interventions that includes the corresponding
component combination. Combinations that were not observed in the NMA model, are denoted by the letter "X".
Frequency of component combinations observed in the NMA is printed by default (freq = TRUE
). As a summary measure,
the median is used by default (median = TRUE
). The magnitude of each relative effect is reflected by the color's intensity.
Estimates close to zero are denoted by white color, and indicates a small magnitude of the corresponding component combination, while
deep green and red colors indicate a large magnitude of the corresponding component combination.
Outcomes nature (beneficial or harmful) is defined in the netmeta
model.
The function can be also adjusted to include z-scores by setting the argument z_value = TRUE
.
Z-scores quantify the strength of statistical evidence. Thus, dark green (or red) indicates strong statistical evidence that
the corresponding component (or combination of components) performs better (or worse) than the reference intervention.
An object of class ggplot
.
In the case where the NMA relative effects are used, the uncertainty of the NMA estimates are reflected by the size of the grey boxes. The bigger the box, the more precise the estimate.
By setting median = FALSE
, the mean is used instead of the median as a summary measure.
The function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) heatcomp(model = nmaMACE)
data(nmaMACE) heatcomp(model = nmaMACE)
The function based on the network meta-analysis (NMA) estimates explores if a set of components has a positive or a negative impact on the outcome, by creating a scatter plot based on the set of interventions that differ by a specific set of components.
loccos( model, sep = "+", combination = NULL, random = TRUE, z_value = FALSE, histogram = TRUE, histogram.color = "blue" )
loccos( model, sep = "+", combination = NULL, random = TRUE, z_value = FALSE, histogram = TRUE, histogram.color = "blue" )
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
combination |
A single character that specifies the component combination of interest. |
random |
|
z_value |
|
histogram |
|
histogram.color |
A single character that specifies the color of the histogram. See |
Axis y represents the intervention's effect when the component combination is not included in the
intervention, while axis x represents the intervention's effect when is included.
Line splits the plot in two parts. For a beneficial outcome, dots above the line
indicates that the inclusion of component combination balk the intervention's efficacy, while
dots below the line indicate that the inclusion of the component combination increases intervention's efficacy.
The opposite holds for harmful outcomes.
The component combination of interest is specified by the argument combination
. For example, if combination = "A"
, the
function plots all the interventions that differ by the component "A"
. If combination = NULL
, all interventions
that differ by one component are plotted.
The function by default uses the NMA relative effects estimates, but it can be adjusted to use the z-values by setting the argument z_value = TRUE
.
Histograms for the nodes that include and not include the component combination can be added to the scatter plot,
by setting the argument histogram = TRUE
.
An object of class ggplot
.
In the case of dichotomous outcomes, the log-scale is used for both axis. Also, the function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) loccos(model = nmaMACE, combination = c("B"))
data(nmaMACE) loccos(model = nmaMACE, combination = c("B"))
An artificial network meta-analysis data compering the effectiveness of a number of interventions for major adverse cardiovascular events.
MACE
MACE
A data.frame
with the following columns
The study name of the trial
Treatment names of arms
Total number of participants in arms
Total number of events in arms
An artificial network meta-analysis (of class netmeta
) compering the effectiveness of a number of interventions for major
adverse cardiovascular events.
nmaMACE
nmaMACE
An object of class netmeta
of length 157.
Rank heat plot summarizes the components' p-scores for multiple outcomes.
rankheatplot( model, sep = "+", median = TRUE, random = TRUE, outcomeNames = NULL, cex_components = NULL, cex_values = NULL, cex_outcomes = NULL )
rankheatplot( model, sep = "+", median = TRUE, random = TRUE, outcomeNames = NULL, cex_components = NULL, cex_values = NULL, cex_outcomes = NULL )
model |
A list of |
sep |
A single character that defines the separator between interventions components. |
median |
|
random |
A |
outcomeNames |
A character vector that specifies the names of the outcomes. |
cex_components |
Font size of components' names. |
cex_values |
Font size of p-scores. |
cex_outcomes |
Font size of outcomes' names. |
The function creates a rank heat plot, where the number of circles depend on the number of outcomes.
Each circle is divided by the total number of components, and each sector is colored according
the corresponding component p-score. Components' p-scores are summarized by using either the median (median = TRUE
)
or the mean (median = FALSE
) of the p-scores obtained from the interventions that include the corresponding component.
The sector's colors reflect the magnitude of the components p-scores. Red color indicates a low p-score (close to zero),
while green color indicates values close to 1. Intervention's p-scores are obtained from the network meta-analysis (NMA) model.
By default the random-effects NMA model is used for each outcome (random = TRUE
).
Returns (invisibly) a rank heat plot.
The function can be applied only in network meta-analysis models that contain multi-component interventions.
# Artificial data set t1 <- c("A", "B", "C", "A+B", "A+C", "B+C", "A") t2 <- c("C", "A", "A+C", "B+C", "A", "B", "B+C") TE1 <- c(2.12, 3.24, 5.65, -0.60, 0.13, 0.66, 3.28) TE2 <- c(4.69, 2.67, 2.73, -3.41, 1.79, 2.93, 2.51) seTE1 <- rep(0.1, 7) seTE2 <- rep(0.2, 7) study <- paste0("study_", 1:7) data1 <- data.frame( "TE" = TE1, "seTE" = seTE1, "treat1" = t1, "treat2" = t2, "studlab" = study, stringsAsFactors = FALSE ) data2 <- data.frame( "TE" = TE2, "seTE" = seTE2, "treat1" = t1, "treat2" = t2, "studlab" = study, stringsAsFactors = FALSE ) # Network meta-analysis models net1 <- netmeta::netmeta( TE = TE, seTE = seTE, studlab = studlab, treat1 = treat1, treat2 = treat2, data = data1, ref = "A" ) net2 <- netmeta::netmeta( TE = TE, seTE = seTE, studlab = studlab, treat1 = treat1, treat2 = treat2, data = data2, ref = "A" ) # Rank heat plot rankheatplot(model = list(net1, net2))
# Artificial data set t1 <- c("A", "B", "C", "A+B", "A+C", "B+C", "A") t2 <- c("C", "A", "A+C", "B+C", "A", "B", "B+C") TE1 <- c(2.12, 3.24, 5.65, -0.60, 0.13, 0.66, 3.28) TE2 <- c(4.69, 2.67, 2.73, -3.41, 1.79, 2.93, 2.51) seTE1 <- rep(0.1, 7) seTE2 <- rep(0.2, 7) study <- paste0("study_", 1:7) data1 <- data.frame( "TE" = TE1, "seTE" = seTE1, "treat1" = t1, "treat2" = t2, "studlab" = study, stringsAsFactors = FALSE ) data2 <- data.frame( "TE" = TE2, "seTE" = seTE2, "treat1" = t1, "treat2" = t2, "studlab" = study, stringsAsFactors = FALSE ) # Network meta-analysis models net1 <- netmeta::netmeta( TE = TE, seTE = seTE, studlab = studlab, treat1 = treat1, treat2 = treat2, data = data1, ref = "A" ) net2 <- netmeta::netmeta( TE = TE, seTE = seTE, studlab = studlab, treat1 = treat1, treat2 = treat2, data = data2, ref = "A" ) # Rank heat plot rankheatplot(model = list(net1, net2))
The function based on the network meta-analysis (NMA) estimates produces violin plots from interventions that include the component combinations of interest.
specc( model, sep = "+", combination = NULL, components_number = FALSE, groups = NULL, random = TRUE, z_value = FALSE, prop_size = TRUE, fill_violin = "lightblue", color_violin = "lightblue", adj_violin = 1, width_violin = 1, boxplot = TRUE, width_boxplot = 0.5, errorbar_type = 5, dots = TRUE, jitter_shape = 16, jitter_position = 0.01, values = TRUE )
specc( model, sep = "+", combination = NULL, components_number = FALSE, groups = NULL, random = TRUE, z_value = FALSE, prop_size = TRUE, fill_violin = "lightblue", color_violin = "lightblue", adj_violin = 1, width_violin = 1, boxplot = TRUE, width_boxplot = 0.5, errorbar_type = 5, dots = TRUE, jitter_shape = 16, jitter_position = 0.01, values = TRUE )
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
combination |
A character vector that specifies the component combinations of interest. |
components_number |
|
groups |
A character vector that contains the clusters of the number of components. Elements of the vector must be integer numbers (e.g. 5 or "5"), or range values (e.g. "3-4" ), or in the "xx+" format (e.g "5+"). |
random |
|
z_value |
|
prop_size |
|
fill_violin |
fill color of the violin. See |
color_violin |
color of the violin. See |
adj_violin |
adjustment of the violin. See |
width_violin |
width of the violin. See |
boxplot |
|
width_boxplot |
width of the boxplot. See |
errorbar_type |
boxplot's line type. See |
dots |
|
jitter_shape |
jitter shape. See |
jitter_position |
jitter position. See |
values |
|
By default the function creates a violin for each component of the network (combination = NULL
). Each violin visualizes the
distribution of the effect estimates, obtained from the interventions that include the corresponding component.
Combinations of interest are specified from the argument combination
. For example, if combination = c("A", "A + B")
,
two violin plots are produced. The first one is based on the interventions that contain the component "A", and the second one, based
on the interventions that contain both components A and B.
By setting the argument components_number = TRUE
, the behavior of intervention's effect as the number of components increased
is explored, by producing violins based on the number of components included in the interventions. If the number of
components included in a intervention ranges between 1 and 3, then 3 violins will be produced in total. The violins will be based on
the interventions that include one component, two components, and three components respectively.
The number of components could be also categorized in groups by the argument groups
. For
example if components_number = TRUE
and groups = c("1-3", 4, "5+")
, 3 violins will be created. One for the
interventions that contain less than 3 components, one for the interventions that contain 4 components and one for those
that contain more than 5 components.
The function by default uses the NMA relative effects, but it could be adjusted to use intervention's z-scores by setting z_value = TRUE
.
In the case where the NMA relative effects, the size of dots reflects the precision of the estimates. Larger dots indicates
more precise NMA estimates.
An object of class ggplot
.
In the case of dichotomous outcomes, the log-scale is used in axis y. Also, the function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) specc(model = nmaMACE, combination = c("B", "C", "B + C"))
data(nmaMACE) specc(model = nmaMACE, combination = c("B", "C", "B + C"))
The function produces a waterfall plot based on the z-values from the interventions that differ by one specific component combination.
watercomp(model, sep = "+", combination = NULL, z_value = FALSE, random = TRUE)
watercomp(model, sep = "+", combination = NULL, z_value = FALSE, random = TRUE)
model |
An object of class |
sep |
A single character that defines the separator between interventions components. |
combination |
A single character that specifies the component combination of interest. |
z_value |
|
random |
|
The function based on the intervention's z-values (default choice) obtained from the network meta-analysis (NMA) model
visualizes all the observed interventions that differ by one specific component
combination, in order to explore if the one extra component combination from every comparison
has a positive or negative impact. Bars above or below of the line,
indicates that the inclusion of the extra specific component combination has an impact on the
intervention. The direction of the impact (positive or negative), depends on the outcomes’ nature
(beneficial or harmful).
The combination of interest is defined from the argument combination
. By default the
function visualizes the interventions that differ by one component (combination = NULL
).
If for example combination = "A+B"
, the function plots the interventions that differ
by "A+B".
An object of class ggplot
.
In the case of dichotomous outcomes, the log-scale is used in axis y. Also, the function can be applied only in network meta-analysis models that contain multi-component interventions.
data(nmaMACE) watercomp(nmaMACE)
data(nmaMACE) watercomp(nmaMACE)