plot.frag.multi {fragility}R Documentation

Plot Method for "frag.multi" Objects

Description

Visualizes the fragility of multiple studies or multiple meta-analyses with binary outcomes.

Usage

## S3 method for class 'frag.multi'
plot(x, method, dir = "both", fragility = "FI", percentage = TRUE,
     max.f = NULL, bar, names.arg, space = 0, breaks, freq, reverse = FALSE,
     xlab, ylab, main = NULL, cex.marker, col.border, col.sig,
     trun.marker = TRUE, ...)

Arguments

x

an object of class "frag.multi" produced by the function frag.studies or frag.mas.

method

a character string indicating the method used to calculate the p-value when x is of class "frag.studies" produced by frag.studies. It must be an element of x$methods; the default is the first method in x$methods.

dir

a character string indicating the type of fragility measures to be considered in the plot with a certain direction of the significance change. It can be one of "sig2nonsig" (significance altered to non-significance), "nonsig2sig" (non-significance altered to significance), and "both" (both directions, the default).

fragility

a character string of either "FI" (fragility index, the default) or "FQ" (fragility quotient), indicating which fragility measure will be presented in the plot.

percentage

a logical value indicating whether the fragility quotient is presented in percentage (TRUE, the default) or not (FALSE). It is only used when the argument fragility = "FQ".

max.f

a positive numeric value indicating the maximum fragility index/quotient to be presented in the plot. Fragility indexes/quotients larger than max.f (if any) will be truncated. The default is NULL (i.e., no truncation).

bar

a logical value indicating whether a bar plot (TRUE) or a histogram (FALSE) will be generated. The bar plot is only available for fragility index (the argument fragility = "FI"); the default is bar = TRUE in this case. For fragility quotient (fragility = "FQ"), bar is always set to FALSE.

names.arg

a vector of names to be plotted below each bar. It is only used in the bar plot (bar = TRUE) for fragility index (fragility = "FI"). The default includes values increasing from the minimum fragility index to the maximum fragility index (or max.f) by 1.

space

the amount of space (as a fraction of the average bar width) left before each bar. The default is 0. It is only used in the bar plot (bar = TRUE) for fragility index (fragility = "FI").

breaks

the breaks on the x axis in the histogram. It is only used when bar = FALSE. It is passed to the function hist with the same default value.

freq

a logical value indicating whether the y axis in the histogram presents frequencies (TRUE) or densities (FALSE). It is only used when bar = FALSE. It is passed to the function hist with the same default value (TRUE if and only if breaks are equidistant; otherwise, FALSE).

reverse

a logical value indicating whether the groups of two directions of significance change. It is only used when dir = "both". The default is FALSE, where the part corresponding to non-significance altered to significance is stacked at the bottom and that corresponding to significance altered to non-significance is stacked at the top in the bar plot or histogram.

xlab

a label for the x axis.

ylab

a label for the y axis.

main

a main title for the plot.

cex.marker

the size of the text about the truncated fragility measures when the argument trun.marker = TRUE and bar = FALSE. The default is 1.

col.border

the color to be used for the border of the bars in the bar plot or the histogram.

col.sig

a vector of two colors for the two directions of significance change. The default includes "forestgreen" (for non-significance altered to significance) and "firebrick" (for significance altered to non-significance), with the opacity setting to alpha.f = 0.1 in adjustcolor.

trun.marker

a logical value indicating whether a text is placed at place of truncated fragility measures (the default is TRUE) in the histogram (bar = FALSE). The text gives information about the truncation.

...

other arguments that can be passed to barplot (when bar = TRUE) or hist (when bar = FALSE).

Details

A bar plot or a histogram is generated. In the bar plot, the x axis presents the values of fragility indexes among the multiple studies or multiple meta-analyses, and the y axis presents the corresponding frequencies (counts). In the histogram, the x axis presents the intervals of fragility indexes or fragility quotients, and the y axis presents the corresponding frequencies (counts) or densities.

Value

None.

References

Lin L (2021). "Factors that impact fragility index and their visualizations." Journal of Evaluation in Clinical Practice, 27(2), 356–64. <doi: 10.1111/jep.13428>

Lin L, Chu H (2022). "Assessing and visualizing fragility of clinical results with binary outcomes in R using the fragility package." PLOS ONE, 17(6), e0268754. <doi: 10.1371/journal.pone.0268754>

See Also

frag.studies and frag.mas for assessing fragility of multiple studies and multiple meta-analyses, respectively.


[Package fragility version 1.4 Index]