Title: | Assessing and Visualizing Fragility of Clinical Results with Binary Outcomes |
---|---|
Description: | A collection of user-friendly functions for assessing and visualizing fragility of individual studies (Walsh et al., 2014 <doi:10.1016/j.jclinepi.2013.10.019>; Lin, 2021 <doi:10.1111/jep.13428>), conventional pairwise meta-analyses (Atal et al., 2019 <doi:10.1016/j.jclinepi.2019.03.012>), and network meta-analyses of multiple treatments with binary outcomes (Xing et al., 2020 <doi:10.1016/j.jclinepi.2020.07.003>). The included functions are designed to: 1) calculate the fragility index (i.e., the minimal event status modifications that can alter the significance or non-significance of the original result) and fragility quotient (i.e., fragility index divided by sample size) at a specific significance level; 2) give the cases of event status modifications for altering the result's significance or non-significance and visualize these cases; 3) visualize the trend of statistical significance as event status is modified; 4) efficiently derive fragility indexes and fragility quotients at multiple significance levels, and visualize the relationship between these fragility measures against the significance levels; and 5) calculate fragility indexes and fragility quotients of multiple datasets (e.g., a collection of clinical trials or meta-analyses) and produce plots of their overall distributions. The outputs from these functions may inform the robustness of clinical results in terms of statistical significance and aid the interpretation of fragility measures. The usage of this package is illustrated in Lin et al. (2023 <doi:10.1016/j.ajog.2022.08.053>) and detailed in Lin and Chu (2022 <doi:10.1371/journal.pone.0268754>). |
Authors: | Lifeng Lin [aut, cre] , Haitao Chu [aut] |
Maintainer: | Lifeng Lin <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.6 |
Built: | 2024-11-25 15:05:58 UTC |
Source: | CRAN |
An illustrative example of clinical studies with binary outcomes.
data("dat.ad")
data("dat.ad")
A data frame with 347 randomized controlled trials of antidepressant drugs, which contains the following 4 variables.
e0
a numeric vector indicating event counts in treatment group 0.
n0
a numeric vector indicating sample sizes in treatment group 0.
e1
a numeric vector indicating event counts in treatment group 1.
n1
a numeric vector indicating sample sizes in treatment group 1.
The binary outcome is acceptability (dropout due to any cause). The 347 trials are selected from Cipriani et al. (2018) after excluding trials with missing data or with more than two treatment arms.
Cipriani A, Furukawa TA, Salanti G, Chaimani A, Atkinson LZ, Ogawa Y, Leucht S, Ruhe HG, Turner EH, Higgins JPT, Egger M, Takeshima N, Hayasaka Y, Imai H, Shinohara K, Tajika A, Ioannidis JPA, Geddes JR (2018). "Comparative efficacy and acceptability of 21 antidepressant drugs for the acute treatment of adults with major depressive disorder: a systematic review and network meta-analysis." Lancet, 391(10128), 1357–66. <doi:10.1016/S0140-6736(17)32802-7>
An illustrative example of network meta-analysis with a binary outcome.
data("dat.copd")
data("dat.copd")
A data frame with 3 studies and 4 treatments, with the following 4 variables.
sid
a numeric vector indicating study IDs.
tid
a numeric vector indicating treatment IDs.
e
a numeric vector indicating event counts.
n
a numeric vector indicating sample sizes.
The dataset was reported in Table 1 of Woods et al. (2010), and was also used as an illustrative example in the netmeta. It investigates the effects of four treatments on chronic obstructive pulmonary disease (COPD), including 1) placebo; 2) fluticasone; 3) salmeterol; and 4) salmeterol fluticasone combination (SFC). Of note, Woods et al. (2010) originally used this dataset to illustrate the usage of network meta-analysis of count and hazard ratio statistics; this package focuses solely on the event counts to show the relevant functions' usage for binary outcomes.
Woods BS, Hawkins N, Scott DA (2010). "Network meta-analysis on the log-hazard scale, combining count and hazard ratio statistics accounting for multi-arm trials: a tutorial." BMC Medical Research Methodology, 10, 54. <doi:10.1186/1471-2288-10-54>
An illustrative example of meta-analyses with binary outcomes.
data("dat.ns")
data("dat.ns")
A data frame with 564 meta-analyses on nutrition support, which contains the following 5 variables.
ma.id
a numeric vector indicating meta-analysis indexes.
e0
a numeric vector indicating event counts in treatment group 0.
n0
a numeric vector indicating sample sizes in treatment group 0.
e1
a numeric vector indicating event counts in treatment group 1.
n1
a numeric vector indicating sample sizes in treatment group 1.
The meta-analyses are extracted from Feinberg et al. (2017) after excluding meta-analyses with non-binary outcomes. The selected 564 meta-analyses focus on different binary outcomes.
Feinberg J, Nielsen EE, Korang SK, Halberg Engell K, Nielsen MS, Zhang K, Didriksen M, Lund L, Lindahl N, Hallum S, Liang N, Xiong W, Yang X, Brunsgaard P, Garioud A, Safi S, Lindschou J, Kondrup J, Gluud C, Jakobsen JC (2017). "Nutrition support in hospitalised adults at nutritional risk." Cochrane Database of Systematic Reviews, 5, Art. No.: CD011598. <doi:10.1002/14651858.CD011598.pub2>
An illustrative example of network meta-analysis with a binary outcome.
data("dat.sc")
data("dat.sc")
A data frame containing 24 studies and 4 treatments, with the following 4 variables.
sid
a numeric vector indicating study IDs.
tid
a numeric vector indicating treatment IDs.
e
a numeric vector indicating event counts.
n
a numeric vector indicating sample sizes.
The dataset was originally reported by Hasselblad (1998) and reanalyzed by Lu and Ades (2006) using formal network meta-analysis methods. It investigates the effects of four treatments on smoking cessation, including 1) no contact; 2) self-help; 3) individual counseling; and 4) group counseling. The outcome is binary, which is the smoking cessation status (yes or no) of a participant after treatment.
Hasselblad V (1998). "Meta-analysis of multitreatment studies." Medical Decision Making, 18(1), 37–43. <doi:10.1177/0272989X9801800110>
Lu G, Ades AE (2006). "Assessing evidence inconsistency in mixed treatment comparisons." Journal of the American Statistical Association, 101(474), 447–59. <doi:10.1198/016214505000001302>
Produces results, such as fragility index, fragility quotient, and event status modifications for altering statistical significance, of a meta-analysis with a binary outcome.
frag.ma(e0, n0, e1, n1, data, measure = "OR", alpha = 0.05, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
frag.ma(e0, n0, e1, n1, data, measure = "OR", alpha = 0.05, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
e0 |
a numeric vector or the corresponding column name in the argument |
n0 |
a numeric vector or the corresponding column name in the argument |
e1 |
a numeric vector or the corresponding column name in the argument |
n1 |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the collected studies in the meta-analysis with a binary outcome. If |
measure |
a character string indicating the measure of treatment effect (i.e., effect size) for the binary outcome. It should be one of |
alpha |
a numeric value between 0 and 1, indicating the statistical significance level (the default is 0.05). It determines the confidence level |
mod.dir |
a character string indicating the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). It is not used when significance is altered to non-significance. It should be one of |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
method |
a character string specifying the method for performing meta-analysis. It is passed to |
test |
a character string specifying how confidence intervals are derived. It is passed to |
drop00 |
a logical value indicating whether studies with no events (or only events) in both groups should be dropped when calculating the observed effect sizes or outcomes. It is passed to |
... |
other arguments that can be passed to |
An object of class "frag.ma"
. The object is a list containing the following components:
data |
original data in the form of a data frame with six columns: event counts, non-event counts, and sample sizes in group 0 and those in group 1 among all studies in the meta-analysis. |
measure |
measure of treatment effect (i.e., effect size). |
alpha |
pre-specified statistical significance level. |
null |
value of odds ratio, relative risk, or risk difference (specified by |
est.ori |
the point estimate of the overall effect size based on the original meta-analysis. |
ci.ori |
the confidence interval of the overall effect size based on the original meta-analysis. |
pval.ori |
the p-value of the overall effect size based on the original meta-analysis. |
mod.dir |
the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). |
FI |
fragility index. |
FQ |
fragility quotient. |
dir |
direction of the change of statistical significance. |
sid.iter |
study index(es) with event status modifications during the iterative algorithm. |
g0.mod.iter |
event status modification(s) in group 0 during the iterative algorithm. |
g1.mod.iter |
event status modification(s) in group 1 during the iterative algorithm. |
est.iter |
point estimate(s) of the overall effect size during the iterative algorithm. |
ci.iter |
confidence interval(s) of the overall effect size during the iterative algorithm. |
data.mod |
data with event status modification(s) that alter the significance or non-significance. |
If the significance or non-significance cannot be altered based on the given range of event status modifications, the fragility index and fragility quotient are defined to be NA
(not available).
Atal I, Porcher R, Boutron I, Ravaud P (2019). "The statistical significance of meta-analyses is frequently fragile: definition of a fragility index for meta-analyses." Journal of Clinical Epidemiology, 111, 32–40. <doi:10.1016/j.jclinepi.2019.03.012>
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>
Lin L, Xing A, Chu H, Murad MH, Xu C, Baer BR, Wells MT, Sanchez-Ramos L (2023). "Assessing the robustness of results from clinical trials and meta-analyses with the fragility index." American Journal of Obstetrics and Gynecology, 228(3), 276–282. <doi:10.1016/j.ajog.2022.08.053>
frag.ma.alpha
for assessing fragility of a meta-analysis at multiple significance levels; frag.mas
for assessing fragility of multiple meta-analyses; frag.study
for assessing fragility of an individual study; and frag.nma
for assessing fragility of a network meta-analysis.
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th meta-analysis out1 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,]) out1 ## Visualize the process of event status modifications ## for altering the non-significance to significance plot(out1) ## Assess fragility based on relative risk out2 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], measure = "RR") out2 ## Assess fragility based on risk difference out3 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], measure = "RD") out3 ## Use the REML method to estimate the heterogeneity variance out4 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], method = "REML") out4 ## Use the Hartung-Knapp-Sidik-Jonkman to derive ## the confidence interval in meta-analysis out5 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], method = "REML", test = "knha") out5 ## Change the significance level to 0.005 out6 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], alpha = 0.005) out6 plot(out6) ## Reduce the distance between the two lines by breaking the y-axis plot(out6, ybreaks = c(5, 9)) ## Suppress the markers of study IDs around the lines plot(out6, ybreaks = c(5, 9), study.marker = FALSE) ## Change the size of markers of study IDs plot(out6, ybreaks = c(5, 9), cex.marker = 0.5) ## Change the distance between the markers of study IDs and the lines plot(out6, ybreaks = c(5, 9), offset.marker = 0) ## Change the colors and width of the lines plot(out6, ybreaks = c(5, 9), col.line = c("gray", "orange"), lwd = 2) ## Change the location of the legend plot(out6, ybreaks = c(5, 9), x.legend = "topleft") ## Assess fragility of the first meta-analysis; ## it takes longer time out7 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,]) out7 plot(out7) plot(out7, ybreaks = c(840, 880)) ## Achieve significance by moving the CI based on the direction of the ## original overall effect size estimate out8 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "one") out8 ## Achieve significance by moving the CI to the left side out9 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "left") out9 ## Achieve significance by moving the CI to the right side; ## it takes longer time than that moving the CI to the left side ## as the original overall effect size estimate was less than the null out10 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "right") out10 dev.new(width = 12, height = 6) plot(out10, cex.marker = 0.5)
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th meta-analysis out1 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,]) out1 ## Visualize the process of event status modifications ## for altering the non-significance to significance plot(out1) ## Assess fragility based on relative risk out2 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], measure = "RR") out2 ## Assess fragility based on risk difference out3 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], measure = "RD") out3 ## Use the REML method to estimate the heterogeneity variance out4 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], method = "REML") out4 ## Use the Hartung-Knapp-Sidik-Jonkman to derive ## the confidence interval in meta-analysis out5 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], method = "REML", test = "knha") out5 ## Change the significance level to 0.005 out6 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], alpha = 0.005) out6 plot(out6) ## Reduce the distance between the two lines by breaking the y-axis plot(out6, ybreaks = c(5, 9)) ## Suppress the markers of study IDs around the lines plot(out6, ybreaks = c(5, 9), study.marker = FALSE) ## Change the size of markers of study IDs plot(out6, ybreaks = c(5, 9), cex.marker = 0.5) ## Change the distance between the markers of study IDs and the lines plot(out6, ybreaks = c(5, 9), offset.marker = 0) ## Change the colors and width of the lines plot(out6, ybreaks = c(5, 9), col.line = c("gray", "orange"), lwd = 2) ## Change the location of the legend plot(out6, ybreaks = c(5, 9), x.legend = "topleft") ## Assess fragility of the first meta-analysis; ## it takes longer time out7 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,]) out7 plot(out7) plot(out7, ybreaks = c(840, 880)) ## Achieve significance by moving the CI based on the direction of the ## original overall effect size estimate out8 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "one") out8 ## Achieve significance by moving the CI to the left side out9 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "left") out9 ## Achieve significance by moving the CI to the right side; ## it takes longer time than that moving the CI to the left side ## as the original overall effect size estimate was less than the null out10 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,], mod.dir = "right") out10 dev.new(width = 12, height = 6) plot(out10, cex.marker = 0.5)
Produces fragility index or fragility quotient for altering statistical significance of a meta-analysis with a binary outcome at different significance levels.
frag.ma.alpha(e0, n0, e1, n1, data, measure = "OR", alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 100, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
frag.ma.alpha(e0, n0, e1, n1, data, measure = "OR", alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 100, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
e0 |
a numeric vector or the corresponding column name in the argument |
n0 |
a numeric vector or the corresponding column name in the argument |
e1 |
a numeric vector or the corresponding column name in the argument |
n1 |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the collected studies in the meta-analysis with a binary outcome. If |
measure |
a character string indicating the measure of treatment effect (i.e., effect size) for the binary outcome. It should be one of |
alpha.from |
a numeric value between 0 and 1, indicating the smallest value of the statistical significance levels to be considered (the default is 0.005). It should be smaller than the argument |
alpha.to |
a numeric value between 0 and 1, indicating the largest value of the statistical significance levels to be considered (the default is 0.05). It should be larger than the argument |
alpha.breaks |
a positive integer indicating the number of statistical significance levels to be considered (the default is 100). The candidate significance levels are thus equally-spaced between |
mod.dir |
a character string indicating the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). It is not used when significance is altered to non-significance. It should be one of |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
method |
a character string specifying the method for performing meta-analysis. It is the same with the argument in |
test |
a character string specifying how confidence intervals are derived. It is the same with the argument in |
drop00 |
a logical value indicating whether studies with no events (or only events) in both groups should be dropped when calculating the observed effect sizes or outcomes. It is passed to |
... |
other arguments that can be passed to |
An object of classes "frag.alpha"
and "frag.ma.alpha"
. The object is a list containing the following components:
data |
original data in the form of a data frame with six columns: event counts, non-event counts, and sample sizes in group 0 and those in group 1 among all studies in the meta-analysis. |
measure |
measure of treatment effect (i.e., effect size). |
alphas |
different statistical significance levels. |
null |
value of odds ratio, relative risk, or risk difference (specified by |
est.ori |
the point estimate of the overall effect size based on the original meta-analysis. |
se.ori |
the standard error of the overall effect size based on the original meta-analysis. |
test |
the method used to derive confidence intervals by the function |
pval.ori |
the p-value of the overall effect size based on the original meta-analysis. |
mod.dir |
the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). |
FI |
fragility indexes at different statistical significance levels in |
FI.avg |
average fragility index. |
FQ |
fragility quotients at different statistical significance levels in |
FQ.avg |
average fragility quotient. |
Benjamin DJ, Berger JO, Johannesson M, Nosek BA, Wagenmakers EJ, Berk R, Bollen KA, Brembs B, Brown L, Camerer C, Cesarini D, Chambers CD, Clyde M, Cook TD, De Boeck P, Dienes Z, Dreber A, Easwaran K, Efferson C, Fehr E, Fidler F, Field AP, Forster M, George EI, Gonzalez R, Goodman S, Green E, Green DP, Greenwald AG, Hadfield JD, Hedges LV, Held L, Ho TH, Hoijtink H, Hruschka DJ, Imai K, Imbens G, Ioannidis JPA, Jeon M, Jones JH, Kirchler M, Laibson D, List J, Little R, Lupia A, Machery E, Maxwell SE, McCarthy M, Moore DA, Morgan SL, Munafo M, Nakagawa S, Nyhan B, Parker TH, Pericchi L, Perugini M, Rouder J, Rousseau J, Savalei V, Schonbrodt FD, Sellke T, Sinclair B, Tingley D, Van Zandt T, Vazire S, Watts DJ, Winship C, Wolpert RL, Xie Y, Young C, Zinman J, Johnson VE (2018). "Redefine statistical significance." Nature Human Behaviour, 2, 6–10. <doi:10.1038/s41562-017-0189-z>
Ioannidis JPA (2018). "The proposal to lower P value thresholds to .005." JAMA, 319(14), 1429–30. <doi:10.1001/jama.2018.1536>
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>
frag.ma
for assessing fragility of a meta-analysis at a specific significance level; and frag.study.alpha
for assessing fragility of an individual study at multiple significance levels
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th meta-analysis ## at multiple significance levels out1 <- frag.ma.alpha(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], alpha.from = 0.01, alpha.to = 0.05, alpha.breaks = 5) out1 ## Generate plot to show fragility measures against significance levels; ## see more options of usage in examples of frag.study.alpha() plot(out1) plot(out1, fragility = "FQ") ## Assess fragility of the 6th meta-analysis ## at multiple significance levels; ## it takes longer time out2 <- frag.ma.alpha(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 6,]) out2 plot(out2)
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th meta-analysis ## at multiple significance levels out1 <- frag.ma.alpha(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,], alpha.from = 0.01, alpha.to = 0.05, alpha.breaks = 5) out1 ## Generate plot to show fragility measures against significance levels; ## see more options of usage in examples of frag.study.alpha() plot(out1) plot(out1, fragility = "FQ") ## Assess fragility of the 6th meta-analysis ## at multiple significance levels; ## it takes longer time out2 <- frag.ma.alpha(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 6,]) out2 plot(out2)
Produces fragility indexes or fragility quotients for altering statistical significance of multiple meta-analyses with binary outcomes.
frag.mas(e0, n0, e1, n1, ma.id, data, measure = "OR", alpha = 0.05, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
frag.mas(e0, n0, e1, n1, ma.id, data, measure = "OR", alpha = 0.05, mod.dir = "both", OR = 1, RR = 1, RD = 0, method = "DL", test = "z", drop00 = FALSE, ...)
e0 |
a numeric vector or the corresponding column name in the argument |
n0 |
a numeric vector or the corresponding column name in the argument |
e1 |
a numeric vector or the corresponding column name in the argument |
n1 |
a numeric vector or the corresponding column name in the argument |
ma.id |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the multiple meta-analyses with binary outcomes. If |
measure |
a character string indicating the measure of treatment effect (i.e., effect size) for the binary outcome. It should be one of |
alpha |
a numeric value between 0 and 1, indicating the statistical significance level (the default is 0.05). It determines the confidence level |
mod.dir |
a character string indicating the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). It is not used when significance is altered to non-significance. It should be one of |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
method |
a character string specifying the method for performing meta-analysis. It is the same with the argument in |
test |
a character string specifying how confidence intervals are derived. It is the same with the argument in |
drop00 |
a logical value indicating whether studies with no events (or only events) in both groups should be dropped when calculating the observed effect sizes or outcomes. It is passed to |
... |
other arguments that can be passed to |
An object of classes "frag.mas"
and "frag.multi"
. The object is a list containing the following components:
measure |
measure of treatment effect (i.e., effect size). |
alpha |
pre-specified statistical significance level. |
null |
value of odds ratio, relative risk, or risk difference (specified by |
mod.dir |
the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). |
est.ori |
the point estimates of the overall effect sizes based on the original datasets of the multiple meta-analyses. |
ci.ori |
the confidence intervals of the overall effect sizes based on the original datasets of the multiple meta-analyses. |
pval.ori |
the p-values of the overall effect sizes based on the original datasets of the multiple meta-analyses. |
FI |
fragility indexes of the multiple meta-analyses. |
FQ |
fragility quotients of the multiple meta-analyses. |
Atal I, Porcher R, Boutron I, Ravaud P (2019). "The statistical significance of meta-analyses is frequently fragile: definition of a fragility index for meta-analyses." Journal of Clinical Epidemiology, 111, 32–40. <doi:10.1016/j.jclinepi.2019.03.012>
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>
frag.ma
for assessing fragility of a meta-analysis; and frag.studies
for assessing fragility of multiple individual studies.
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th, 12th, and 13th meta-analyses out1 <- frag.mas(e0, n0, e1, n1, ma.id, data = dat.ns[dat.ns$ma.id >= 11 & dat.ns$ma.id <= 13,], mod.dir = "one") out1 ## Generate bar plot or histogram to show fragility measures' distribution; ## see more options of usage in examples of frag.studies() plot(out1) ## Assess fragility of all meta-analyses ## in the Cochrane systematic review on nutrition support; ## it takes longer time out2 <- frag.mas(e0, n0, e1, n1, ma.id, data = dat.ns) out2 plot(out2) plot(out2, max.f = 40, cex.name = 0.6, mgp = c(2, 0.5, 0)) plot(out2, fragility = "FQ", breaks = 20)
## Load datasets of meta-analyses on nutrition support data(dat.ns) ## Assess fragility of the 11th, 12th, and 13th meta-analyses out1 <- frag.mas(e0, n0, e1, n1, ma.id, data = dat.ns[dat.ns$ma.id >= 11 & dat.ns$ma.id <= 13,], mod.dir = "one") out1 ## Generate bar plot or histogram to show fragility measures' distribution; ## see more options of usage in examples of frag.studies() plot(out1) ## Assess fragility of all meta-analyses ## in the Cochrane systematic review on nutrition support; ## it takes longer time out2 <- frag.mas(e0, n0, e1, n1, ma.id, data = dat.ns) out2 plot(out2) plot(out2, max.f = 40, cex.name = 0.6, mgp = c(2, 0.5, 0)) plot(out2, fragility = "FQ", breaks = 20)
Produces results, such as fragility index, fragility quotient, and event status modifications for altering statistical significance, of treatment comparison(s) in a network meta-analysis with a binary outcome.
frag.nma(sid, tid, e, n, data, measure = "OR", random = TRUE, alpha = 0.05, mod.dir = "both", tid1.f, tid2.f, OR = 1, RR = 1, RD = 0, incr, allincr, addincr, allstudies, ...)
frag.nma(sid, tid, e, n, data, measure = "OR", random = TRUE, alpha = 0.05, mod.dir = "both", tid1.f, tid2.f, OR = 1, RR = 1, RD = 0, incr, allincr, addincr, allstudies, ...)
sid |
a numeric vector or the corresponding column name in the argument |
tid |
a numeric vector or the corresponding column name in the argument |
e |
a numeric vector or the corresponding column name in the argument |
n |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the collected studies on multiple treatment comparisons in the network meta-analysis with a binary outcome. If |
measure |
a character string indicating the measure of treatment effect (i.e., effect size) for the binary outcome. It should be one of |
random |
a logical value indicating whether the network meta-analysis is performed under the fixed-effects setting ( |
alpha |
a numeric value between 0 and 1, indicating the statistical significance level (the default is 0.05). It determines the confidence level |
mod.dir |
a character string or a square matrix of character strings indicating the direction of the confidence interval change for each treatment comparison due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). It is not used when significance is altered to non-significance. It should be one of |
tid1.f |
the first treatment(s) of comparison(s) of interest; if not specified, the fragility of all comparisons will be assessed. |
tid2.f |
the second treatment(s) of comparison(s) of interest. |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
incr |
A numerical value which is added to each cell frequency for studies with a zero cell count. It is passed to the function |
allincr |
A logical value indicating whether |
addincr |
A logical value indicating whether |
allstudies |
A logical value indicating whether studies with zero or all events in two treatment groups are to be included in the network meta-analysis (the default is |
... |
other arguments that can be passed to |
An object of class "frag.nma"
. The object is a list containing the following components:
data |
original data of the network meta-analysis. |
measure |
measure of treatment effect (i.e., effect size). |
alpha |
pre-specified statistical significance level. |
null |
value of odds ratio, relative risk, or risk difference (specified by |
est.ori |
a matrix containing the point estimate of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. Each element presents the treatment corresponding to the row compared with the treatment corresponding to the column; a similar interpretation applies to other outputs in the form of a matrix. |
ci.lb.ori |
the lower bound of the confidence interval of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. |
ci.lb.ori |
the upper bound of the confidence interval of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. |
pval.ori |
the p-value of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. |
mod.dir |
the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). |
tid.f |
treatment comparisons whose fragility is assessed. |
FI |
fragility index. |
FQ |
fragility quotient, calculated as fragility index divided by the total sample size associated with the specific treatment comparison. |
FQ.nma |
fragility quotient, calculated as fragility index divided by the total sample size in the whole network meta-analysis (across all treatment groups). |
dir |
direction of the change of statistical significance. |
sid.iter |
a list of study index(es) with event status modifications during the iterative algorithm for specific pairs of treatment comparisons. |
tid1.mod.iter |
a list of event status modification(s) in the first treatment group during the iterative algorithm for specific pairs of treatment comparisons. |
tid2.mod.iter |
a list of event status modification(s) in the second treatment group during the iterative algorithm for specific pairs of treatment comparisons. |
est.iter |
a list of point estimate(s) of the overall effect size during the iterative algorithm for specific pairs of treatment comparisons. |
ci.lb.iter |
a list of lower bound(s) of confidence interval(s) of the overall effect size during the iterative algorithm for specific pairs of treatment comparisons. |
ci.ub.iter |
a list of upper bound(s) of confidence interval(s) of the overall effect size during the iterative algorithm for specific pairs of treatment comparisons. |
data.mod |
a list of data with event status modification(s) that alter the significance or non-significance for specific pairs of treatment comparisons. |
When the network meta-analysis contains many studies and many treatments, the assessment of fragility may be very computationally demanding. In such cases, one may focus on certain treatment comparisons that are of primary interest by specifying the arguments tid1.f
and tid2.f
. Also, if the significance or non-significance cannot be altered based on the given range of event status modifications, the fragility index and fragility quotient are defined to be NA
(not available).
Schwarzer G, Carpenter JR, Rucker G (2015). Meta-Analysis with R. Cham, Switzerland: Springer. <doi:10.1007/978-3-319-21416-0>
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>
Lin L, Xing A, Chu H, Murad MH, Xu C, Baer BR, Wells MT, Sanchez-Ramos L (2023). "Assessing the robustness of results from clinical trials and meta-analyses with the fragility index." American Journal of Obstetrics and Gynecology, 228(3), 276–282. <doi:10.1016/j.ajog.2022.08.053>
Xing A, Chu H, Lin L (2020). "Fragility index of network meta-analysis with application to smoking cessation data." Journal of Clinical Epidemiology, 127, 29–39. <doi:10.1016/j.jclinepi.2020.07.003>
frag.nma.alpha
for assessing fragility of a network meta-analysis at multiple significance levels; frag.study
for assessing fragility of an individual study; and frag.ma
for assessing fragility of a meta-analysis.
## Load datasets of network meta-analysis of ## chronic obstructive pulmonary disease (COPD) data(dat.copd) ## Assess fragility of network meta-analysis of COPD out1 <- frag.nma(sid, tid, e, n, data = dat.copd) out1 ## Retrieve the estimated log odds ratio in the original dataset out1$est.ori ## Retrieve the fragility index of each treatment comparison out1$FI ## Retrieve the direction of significance change for comparison 2 vs. 3 out1$dir["2", "3"] ## Retrieve the study IDs with iterative event status modifications ## for comparison 2 vs. 3 out1$sid.iter[["2 vs. 3"]] ## Retrieve the event status modifications ## in the first group (i.e., treatment 2) out1$tid1.mod.iter[["2 vs. 3"]] ## Retrieve the event status modifications ## in the second group (i.e., treatment 3) out1$tid2.mod.iter[["2 vs. 3"]] ## Visualize the process of event status modifications ## for altering the non-significance to significance for each comparison; ## see more options of usage in examples of frag.ma() plot(out1, tid1 = 2, tid2 = 1) plot(out1, tid1 = 3, tid2 = 1) plot(out1, tid1 = 4, tid2 = 1) plot(out1, tid1 = 3, tid2 = 2) plot(out1, tid1 = 4, tid2 = 2) plot(out1, tid1 = 4, tid2 = 3) ## Assess fragility of treatment comparisons 2 vs. 1 and 3 vs. 1 only out2 <- frag.nma(sid, tid, e, n, data = dat.copd, tid1.f = c(2, 3), tid2.f = c(1, 1)) out2 ## The default plot presents the process of event status modification ## for the first comparison, i.e., 2 vs. 1 plot(out2) ## Load datasets of network meta-analysis of smoking cessation data(dat.sc) ## Assess fragility of network meta-analysis of smoking cessation out3 <- frag.nma(sid, tid, e, n, data = dat.sc) out3 ## Visualize the process of event status modifications plot(out3, tid1 = 2, tid2 = 1, ybreaks = c(170, 595), x.legend = "topright") plot(out3, tid1 = 3, tid2 = 1, ybreaks = c(635, 1200), x.legend = "bottomright") plot(out3, tid1 = 4, tid2 = 1, ybreaks = c(105, 600)) plot(out3, tid1 = 3, tid2 = 2, ybreaks = c(160, 1205)) plot(out3, tid1 = 4, tid2 = 2, ybreaks = c(110, 140), x.legend = "topright") plot(out3, tid1 = 4, tid2 = 3, ybreaks = c(130, 1205), x.legend = "bottomright")
## Load datasets of network meta-analysis of ## chronic obstructive pulmonary disease (COPD) data(dat.copd) ## Assess fragility of network meta-analysis of COPD out1 <- frag.nma(sid, tid, e, n, data = dat.copd) out1 ## Retrieve the estimated log odds ratio in the original dataset out1$est.ori ## Retrieve the fragility index of each treatment comparison out1$FI ## Retrieve the direction of significance change for comparison 2 vs. 3 out1$dir["2", "3"] ## Retrieve the study IDs with iterative event status modifications ## for comparison 2 vs. 3 out1$sid.iter[["2 vs. 3"]] ## Retrieve the event status modifications ## in the first group (i.e., treatment 2) out1$tid1.mod.iter[["2 vs. 3"]] ## Retrieve the event status modifications ## in the second group (i.e., treatment 3) out1$tid2.mod.iter[["2 vs. 3"]] ## Visualize the process of event status modifications ## for altering the non-significance to significance for each comparison; ## see more options of usage in examples of frag.ma() plot(out1, tid1 = 2, tid2 = 1) plot(out1, tid1 = 3, tid2 = 1) plot(out1, tid1 = 4, tid2 = 1) plot(out1, tid1 = 3, tid2 = 2) plot(out1, tid1 = 4, tid2 = 2) plot(out1, tid1 = 4, tid2 = 3) ## Assess fragility of treatment comparisons 2 vs. 1 and 3 vs. 1 only out2 <- frag.nma(sid, tid, e, n, data = dat.copd, tid1.f = c(2, 3), tid2.f = c(1, 1)) out2 ## The default plot presents the process of event status modification ## for the first comparison, i.e., 2 vs. 1 plot(out2) ## Load datasets of network meta-analysis of smoking cessation data(dat.sc) ## Assess fragility of network meta-analysis of smoking cessation out3 <- frag.nma(sid, tid, e, n, data = dat.sc) out3 ## Visualize the process of event status modifications plot(out3, tid1 = 2, tid2 = 1, ybreaks = c(170, 595), x.legend = "topright") plot(out3, tid1 = 3, tid2 = 1, ybreaks = c(635, 1200), x.legend = "bottomright") plot(out3, tid1 = 4, tid2 = 1, ybreaks = c(105, 600)) plot(out3, tid1 = 3, tid2 = 2, ybreaks = c(160, 1205)) plot(out3, tid1 = 4, tid2 = 2, ybreaks = c(110, 140), x.legend = "topright") plot(out3, tid1 = 4, tid2 = 3, ybreaks = c(130, 1205), x.legend = "bottomright")
Produces fragility index or fragility quotient for altering statistical significance of treatment comparison(s) in a network meta-analysis with a binary outcome at different significance levels.
frag.nma.alpha(sid, tid, e, n, data, measure = "OR", random = TRUE, alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 10, mod.dir = "both", tid1.f, tid2.f, OR = 1, RR = 1, RD = 0, incr, allincr, addincr, allstudies, ...)
frag.nma.alpha(sid, tid, e, n, data, measure = "OR", random = TRUE, alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 10, mod.dir = "both", tid1.f, tid2.f, OR = 1, RR = 1, RD = 0, incr, allincr, addincr, allstudies, ...)
sid |
a numeric vector or the corresponding column name in the argument |
tid |
a numeric vector or the corresponding column name in the argument |
e |
a numeric vector or the corresponding column name in the argument |
n |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the collected studies on multiple treatment comparisons in the network meta-analysis with a binary outcome. If |
measure |
a character string indicating the measure of treatment effect (i.e., effect size) for the binary outcome. It should be one of |
random |
a logical value indicating whether the network meta-analysis is performed under the fixed-effects setting ( |
alpha.from |
a numeric value between 0 and 1, indicating the smallest value of the statistical significance levels to be considered (the default is 0.005). It should be smaller than the argument |
alpha.to |
a numeric value between 0 and 1, indicating the largest value of the statistical significance levels to be considered (the default is 0.05). It should be larger than the argument |
alpha.breaks |
a positive integer indicating the number of statistical significance levels to be considered (the default is 100). The candidate significance levels are thus equally-spaced between |
mod.dir |
a character string or a square matrix of character strings indicating the direction of the confidence interval change for each treatment comparison due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). It is not used when significance is altered to non-significance. It should be one of |
tid1.f |
the first treatment(s) of comparison(s) of interest; if not specified, the fragility of all comparisons will be assessed. |
tid2.f |
the second treatment(s) of comparison(s) of interest. |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
incr |
A numerical value which is added to each cell frequency for studies with a zero cell count. It is passed to the function |
allincr |
A logical value indicating whether |
addincr |
A logical value indicating whether |
allstudies |
A logical value indicating whether studies with zero or all events in two treatment groups are to be included in the network meta-analysis (the default is |
... |
other arguments that can be passed to |
An object of classes "frag.alpha"
and "frag.nma.alpha"
. The object is a list containing the following components:
data |
original data of the network meta-analysis. |
measure |
measure of treatment effect (i.e., effect size). |
alphas |
different statistical significance levels. |
null |
value of odds ratio, relative risk, or risk difference (specified by |
est.ori |
a matrix containing the point estimate of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. Each element presents the treatment corresponding to the row compared with the treatment corresponding to the column; a similar interpretation applies to other outputs in the form of a matrix. |
se.ori |
a matrix containing the standard error of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. |
pval.ori |
the p-value of the overall effect size for each pair of treatment comparisons based on the original network meta-analysis. |
mod.dir |
the direction of the confidence interval change due to event status modifications when the original confidence interval covers the null value (i.e., non-significance altered to significance). |
tid.f |
treatment comparisons whose fragility is assessed. |
FI |
fragility indexes at different statistical significance levels in |
FI.avg |
average fragility indexes. |
FQ |
fragility quotients at different statistical significance levels in |
FQ.avg |
average fragility quotients based on the total sample sizes associated with the specific treatment comparisons. |
FQ.nma |
fragility quotients at different statistical significance levels in |
FQ.nma.avg |
average fragility quotients based on the total sample size in the whole network meta-analysis (across all treatment groups). |
When the network meta-analysis contains many studies and many treatments, the assessment of fragility may be very computationally demanding. In such cases, one may focus on certain treatment comparisons that are of primary interest by specifying the arguments tid1.f
and tid2.f
.
Benjamin DJ, Berger JO, Johannesson M, Nosek BA, Wagenmakers EJ, Berk R, Bollen KA, Brembs B, Brown L, Camerer C, Cesarini D, Chambers CD, Clyde M, Cook TD, De Boeck P, Dienes Z, Dreber A, Easwaran K, Efferson C, Fehr E, Fidler F, Field AP, Forster M, George EI, Gonzalez R, Goodman S, Green E, Green DP, Greenwald AG, Hadfield JD, Hedges LV, Held L, Ho TH, Hoijtink H, Hruschka DJ, Imai K, Imbens G, Ioannidis JPA, Jeon M, Jones JH, Kirchler M, Laibson D, List J, Little R, Lupia A, Machery E, Maxwell SE, McCarthy M, Moore DA, Morgan SL, Munafo M, Nakagawa S, Nyhan B, Parker TH, Pericchi L, Perugini M, Rouder J, Rousseau J, Savalei V, Schonbrodt FD, Sellke T, Sinclair B, Tingley D, Van Zandt T, Vazire S, Watts DJ, Winship C, Wolpert RL, Xie Y, Young C, Zinman J, Johnson VE (2018). "Redefine statistical significance." Nature Human Behaviour, 2, 6–10. <doi:10.1038/s41562-017-0189-z>
Ioannidis JPA (2018). "The proposal to lower P value thresholds to .005." JAMA, 319(14), 1429–30. <doi:10.1001/jama.2018.1536>
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>
## Load datasets of network meta-analysis of ## chronic obstructive pulmonary disease (COPD) data(dat.copd) ## Assess fragility of network meta-analysis of COPD ## at multiple significance levels out1 <- frag.nma.alpha(sid, tid, e, n, data = dat.copd) out1 ## Generate plot to show fragility measures against significance levels; ## see more options of usage in examples of frag.study.alpha() plot(out1, tid1 = 2, tid2 = 1) plot(out1, tid1 = 3, tid2 = 1) plot(out1, tid1 = 4, tid2 = 1) plot(out1, tid1 = 3, tid2 = 2) plot(out1, tid1 = 4, tid2 = 2) plot(out1, tid1 = 4, tid2 = 3)
## Load datasets of network meta-analysis of ## chronic obstructive pulmonary disease (COPD) data(dat.copd) ## Assess fragility of network meta-analysis of COPD ## at multiple significance levels out1 <- frag.nma.alpha(sid, tid, e, n, data = dat.copd) out1 ## Generate plot to show fragility measures against significance levels; ## see more options of usage in examples of frag.study.alpha() plot(out1, tid1 = 2, tid2 = 1) plot(out1, tid1 = 3, tid2 = 1) plot(out1, tid1 = 4, tid2 = 1) plot(out1, tid1 = 3, tid2 = 2) plot(out1, tid1 = 4, tid2 = 2) plot(out1, tid1 = 4, tid2 = 3)
Produces fragility indexes or fragility quotients for altering statistical significance of multiple individual studies with binary outcomes.
frag.studies(e0, n0, e1, n1, data, methods, modify0 = "both", modify1 = "both", alpha = 0.05, alternative = "two.sided", OR = 1, RR = 1, RD = 0)
frag.studies(e0, n0, e1, n1, data, methods, modify0 = "both", modify1 = "both", alpha = 0.05, alternative = "two.sided", OR = 1, RR = 1, RD = 0)
e0 |
a numeric vector or the corresponding column name in the argument |
n0 |
a numeric vector or the corresponding column name in the argument |
e1 |
a numeric vector or the corresponding column name in the argument |
n1 |
a numeric vector or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of multiple individual studies with binary outcomes. If |
methods |
a character string or a vector of character strings indicating the method(s) used to calculate the p-value(s) of the association between treatment and outcome. It must consist of |
modify0 |
a character string indicating the event status modifications in group 0. It should be one of |
modify1 |
a character string indicating the event status modifications in group 1. It has the same usage with |
alpha |
a numeric value between 0 and 1, indicating the statistical significance level (the default is 0.05). |
alternative |
a character string of either |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
An object of classes "frag.multi"
and "frag.studies"
. The object is a list containing the following components:
methods |
methods used to calculate the p-value(s) of the association between treatment and outcome. |
alpha |
pre-specified statistical significance level. |
alternative |
alternative hypothesis. |
null |
values of odds ratio, relative risk, and risk difference under the null hypothesis; they are only used if |
modify0 |
type of event status modifications in group 0. |
modify1 |
type of event status modifications in group 1. |
pval |
p-value(s) produced by the method(s) included in the argument |
FI |
fragility indexes based on the method(s) among all studies. |
FQ |
fragility quotients based on the method(s) among all studies. |
Of note, if both arguments modify0
and modify0
are "none"
(i.e., no modification), the items FI
and FQ
in the above list are not produced, because fragility cannot be assessed without event status modifications.
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>
Walsh M, Srinathan SK, McAuley DF, Mrkobrada M, Levine O, Ribic C, Molnar AO, Dattani ND, Burke A, Guyatt G, Thabane L, Walter SD, Pogue J, Devereaux PJ (2014). "The statistical significance of randomized controlled trial results is frequently fragile: a case for a Fragility Index." Journal of Clinical Epidemiology, 67(6), 622–8. <doi:10.1016/j.jclinepi.2013.10.019>
frag.study
for assessing fragility of an individual study.
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of first 50 trials on antidepressant drugs out1 <- frag.studies(e0, n0, e1, n1, data = dat.ad[1:50,], methods = "OR") out1 ## Visualize the results using the bar plot of fragility indexes plot(out1) ## Additional arguments that can be passed to barplot() plot(out1, cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Bar plot of fragility index") ## Reverse the bars that represent two directions of significance change plot(out1, reverse = TRUE) ## Add space between bars, suppress borders, and change colors of bars plot(out1, space = 0.5, col.border = NA, col.sig = c("blue", "red"), cex.name = 0.7, mgp = c(2, 0.5, 0)) ## More options, such as legends, can be added to the plot legend("topright", fill = c("blue", "red"), border = NA, legend = c("Non-significance altered to significance", "Significance altered to non-significance")) ## Visualize the results using the histogram of fragility indexes plot(out1, bar = FALSE) ## Present density, instead of frequencies (counts), in the histogram plot(out1, bar = FALSE, freq = FALSE) ## Visualize the results using the histogram of fragility quotients plot(out1, fragility = "FQ") ## Assess fragility of the complete datasets of 347 trials; ## it takes longer time out2 <- frag.studies(e0, n0, e1, n1, data = dat.ad) out2 ## Generate the bar plot for each method plot(out2, method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Fisher's exact Test") plot(out2, method = "chisq", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Chi-squared test") plot(out2, method = "OR", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Odds ratio") plot(out2, method = "RR", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Relative risk") plot(out2, method = "RD", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Risk difference") ## Restrict the bar plot to studies with ## significance altered to non-significance plot(out2, dir = "sig2nonsig", method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Fisher's exact Test") ## Restrict the bar plot to studies with ## non-significance altered to significance plot(out2, dir = "nonsig2sig", method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Fisher's exact Test") ## Truncate the fragility index at 16 plot(out2, method = "Fisher", max.f = 16, cex.name = 0.7, mgp = c(2, 0.5, 0)) ## A marker for the truncation will be presented in the histogram plot(out2, method = "Fisher", bar = FALSE, max.f = 16, mgp = c(2, 0.5, 0)) ## Visualize the fragility quotients of all trials plot(out2, method = "Fisher", fragility = "FQ", max.f = 16, mgp = c(2, 0.5, 0)) ## Use more breaks in the histogram plot(out2, method = "Fisher", fragility = "FQ", max.f = 16, breaks = 20, mgp = c(2, 0.5, 0))
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of first 50 trials on antidepressant drugs out1 <- frag.studies(e0, n0, e1, n1, data = dat.ad[1:50,], methods = "OR") out1 ## Visualize the results using the bar plot of fragility indexes plot(out1) ## Additional arguments that can be passed to barplot() plot(out1, cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Bar plot of fragility index") ## Reverse the bars that represent two directions of significance change plot(out1, reverse = TRUE) ## Add space between bars, suppress borders, and change colors of bars plot(out1, space = 0.5, col.border = NA, col.sig = c("blue", "red"), cex.name = 0.7, mgp = c(2, 0.5, 0)) ## More options, such as legends, can be added to the plot legend("topright", fill = c("blue", "red"), border = NA, legend = c("Non-significance altered to significance", "Significance altered to non-significance")) ## Visualize the results using the histogram of fragility indexes plot(out1, bar = FALSE) ## Present density, instead of frequencies (counts), in the histogram plot(out1, bar = FALSE, freq = FALSE) ## Visualize the results using the histogram of fragility quotients plot(out1, fragility = "FQ") ## Assess fragility of the complete datasets of 347 trials; ## it takes longer time out2 <- frag.studies(e0, n0, e1, n1, data = dat.ad) out2 ## Generate the bar plot for each method plot(out2, method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Fisher's exact Test") plot(out2, method = "chisq", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Chi-squared test") plot(out2, method = "OR", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Odds ratio") plot(out2, method = "RR", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Relative risk") plot(out2, method = "RD", cex.name = 0.7, mgp = c(2, 0.5, 0), ylim = c(0, 60), main = "Risk difference") ## Restrict the bar plot to studies with ## significance altered to non-significance plot(out2, dir = "sig2nonsig", method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Fisher's exact Test") ## Restrict the bar plot to studies with ## non-significance altered to significance plot(out2, dir = "nonsig2sig", method = "Fisher", cex.name = 0.7, mgp = c(2, 0.5, 0), main = "Fisher's exact Test") ## Truncate the fragility index at 16 plot(out2, method = "Fisher", max.f = 16, cex.name = 0.7, mgp = c(2, 0.5, 0)) ## A marker for the truncation will be presented in the histogram plot(out2, method = "Fisher", bar = FALSE, max.f = 16, mgp = c(2, 0.5, 0)) ## Visualize the fragility quotients of all trials plot(out2, method = "Fisher", fragility = "FQ", max.f = 16, mgp = c(2, 0.5, 0)) ## Use more breaks in the histogram plot(out2, method = "Fisher", fragility = "FQ", max.f = 16, breaks = 20, mgp = c(2, 0.5, 0))
Produces results, such as fragility index, fragility quotient, and event status modifications for altering statistical significance, of an individual study with a binary outcome.
frag.study(e0, n0, e1, n1, data, all = FALSE, methods, modify0 = "both", modify1 = "both", alpha = 0.05, alternative = "two.sided", OR = 1, RR = 1, RD = 0, allcase = TRUE)
frag.study(e0, n0, e1, n1, data, all = FALSE, methods, modify0 = "both", modify1 = "both", alpha = 0.05, alternative = "two.sided", OR = 1, RR = 1, RD = 0, allcase = TRUE)
e0 |
a numeric value or the corresponding column name in the argument |
n0 |
a numeric value or the corresponding column name in the argument |
e1 |
a numeric value or the corresponding column name in the argument |
n1 |
a numeric value or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the individual study with a binary outcome. If |
all |
a logical value indicating whether all eligible event status modifications will be considered (the default is |
methods |
a character string or a vector of character strings indicating the method(s) used to calculate the p-value(s) of the association between treatment and outcome. It must consist of |
modify0 |
a character string indicating the event status modifications in group 0. It should be one of |
modify1 |
a character string indicating the event status modifications in group 1. It has the same usage with |
alpha |
a numeric value between 0 and 1, indicating the statistical significance level (the default is 0.05). |
alternative |
a character string of either |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
allcase |
a logical value indicating whether obtaining all cases of minimal event status modifications for altering statistical significance or non-significance (the default is |
An object of class "frag.study"
(if the argument all
= FALSE
) or of both classes "frag.study"
and "frag.study.all"
(all
= TRUE
). The object is a list containing the following components:
data |
original data in the form of 2 |
methods |
methods used to calculate the p-value(s) of the association between treatment and outcome. |
alpha |
pre-specified statistical significance level. |
alternative |
alternative hypothesis. |
null |
values of odds ratio, relative risk, and risk difference under the null hypothesis; they are only used if |
modify0 |
type of event status modifications in group 0. |
modify1 |
type of event status modifications in group 1. |
f0.range |
range of event status modifications in group 0. |
f1.range |
range of event status modifications in group 1. |
allcase |
a logical value indicating whether all cases of minimal event status modifications for altering statistical significance are obtained; it is only included in the object of class |
tot.mods |
a matrix containing all possible event status modifications with rows representing modifications in group 0 and columns representing those in group 1; it is determined by |
pval |
p-value(s) produced by the method(s) included in the argument |
FI |
fragility index(es) based on the method(s). |
FQ |
fragility quotient(s) based on the method(s). |
dir |
direction of the change of statistical significance. |
mods |
minimal event status modification(s) that alter statistical significance or non-significance. |
pvals |
p-values based on all possible event status modifications (as in |
FI0 |
fragility index(es) based on the method(s) when event status modifications are restricted to group 0; it is only included in the object of class |
FQ0 |
fragility quotient(s) based on the method(s) when event status modifications are restricted to group 0; it is only included in the object of class |
dir0 |
direction of the change of statistical significance when event status modifications are restricted to group 0; it is only included in the object of class |
mods0 |
minimal event status modification(s) that alter statistical significance or non-significance when event status modifications are restricted to group 0; it is only included in the object of class |
FI1 |
fragility index(es) based on the method(s) when event status modifications are restricted to group 1; it is only included in the object of class |
FQ1 |
fragility quotient(s) based on the method(s) when event status modifications are restricted to group 1; it is only included in the object of class |
dir1 |
direction of the change of statistical significance when event status modifications are restricted to group 1; it is only included in the object of class |
mods1 |
minimal event status modification(s) that alter statistical significance or non-significance when event status modifications are restricted to group 1; it is only included in the object of class |
Of note, if both arguments modify0
and modify0
are "none"
(i.e., no modification), the items following pval
in the above list are not produced, because fragility cannot be assessed without event status modifications.
If the significance or non-significance cannot be altered based on the given range of event status modifications, the fragility index and fragility quotient are defined to be NA
(not available).
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>
Lin L, Xing A, Chu H, Murad MH, Xu C, Baer BR, Wells MT, Sanchez-Ramos L (2023). "Assessing the robustness of results from clinical trials and meta-analyses with the fragility index." American Journal of Obstetrics and Gynecology, 228(3), 276–282. <doi:10.1016/j.ajog.2022.08.053>
Walsh M, Srinathan SK, McAuley DF, Mrkobrada M, Levine O, Ribic C, Molnar AO, Dattani ND, Burke A, Guyatt G, Thabane L, Walter SD, Pogue J, Devereaux PJ (2014). "The statistical significance of randomized controlled trial results is frequently fragile: a case for a Fragility Index." Journal of Clinical Epidemiology, 67(6), 622–8. <doi:10.1016/j.jclinepi.2013.10.019>
frag.study.alpha
for assessing fragility of an individual study at multiple significance levels; frag.studies
for assessing fragility of multiple studies; frag.ma
for assessing fragility of a meta-analysis; and frag.nma
for assessing fragility of a network meta-analysis.
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of trial 13 out1 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,]) out1 ## Consider all possible event status modifications ## and focus on odds ratio out2 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, methods = "OR") out2 ## Visualize the fragility plot(out2) ## Restrict the modifications to treatment group 0 plot(out2, modify1 = FALSE) ## Change the truncation threshold of p-value to 10^-30 plot(out2, modify1 = FALSE, trun = 30) ## Restrict the modifications to treatment group 1 plot(out2, modify0 = FALSE) ## Assess fragility of trial 13 ## by only increasing event counts in treatment group 0 out3 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, modify0 = "increase", modify1 = "none") out3 ## The default plot is for the first method (i.e., Fisher's exact test) ## if the argument method is not specified plot(out3) ## Generate plots based on other methods plot(out3, method = "chisq") plot(out3, method = "OR") plot(out3, method = "RR") plot(out3, method = "RD") ## Assess fragility of trial 13 ## by only modifying event status in treatment group 1 out4 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, modify0 = "none", modify1 = "both") out4 plot(out4) ## Change background colors in the plot plot(out4, col.sig = c(adjustcolor("blue", alpha.f = 0.1), adjustcolor("green", alpha.f = 0.1))) ## Adjust the plot by specifying additional arguments of plot.default() plot(out4, mgp = c(2, 1, 0), main = "Trial 13", font.main = 1) ## An example of non-significance altered to significance out5 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE) out5 plot(out5, method = "Fisher", legend.pvals = 0.001, main = paste("Fragility index =", out5$FI["Fisher"], "in trial 21")) ## Change the statistical significance level to 0.005 out6 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE, alpha = 0.005) out6 plot(out6) ## Change the null value of odds ratio to 2 out7 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE, methods = c("OR"), alpha = 0.05, OR = 2) out7 plot(out7)
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of trial 13 out1 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,]) out1 ## Consider all possible event status modifications ## and focus on odds ratio out2 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, methods = "OR") out2 ## Visualize the fragility plot(out2) ## Restrict the modifications to treatment group 0 plot(out2, modify1 = FALSE) ## Change the truncation threshold of p-value to 10^-30 plot(out2, modify1 = FALSE, trun = 30) ## Restrict the modifications to treatment group 1 plot(out2, modify0 = FALSE) ## Assess fragility of trial 13 ## by only increasing event counts in treatment group 0 out3 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, modify0 = "increase", modify1 = "none") out3 ## The default plot is for the first method (i.e., Fisher's exact test) ## if the argument method is not specified plot(out3) ## Generate plots based on other methods plot(out3, method = "chisq") plot(out3, method = "OR") plot(out3, method = "RR") plot(out3, method = "RD") ## Assess fragility of trial 13 ## by only modifying event status in treatment group 1 out4 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[13,], all = TRUE, modify0 = "none", modify1 = "both") out4 plot(out4) ## Change background colors in the plot plot(out4, col.sig = c(adjustcolor("blue", alpha.f = 0.1), adjustcolor("green", alpha.f = 0.1))) ## Adjust the plot by specifying additional arguments of plot.default() plot(out4, mgp = c(2, 1, 0), main = "Trial 13", font.main = 1) ## An example of non-significance altered to significance out5 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE) out5 plot(out5, method = "Fisher", legend.pvals = 0.001, main = paste("Fragility index =", out5$FI["Fisher"], "in trial 21")) ## Change the statistical significance level to 0.005 out6 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE, alpha = 0.005) out6 plot(out6) ## Change the null value of odds ratio to 2 out7 <- frag.study(e0 = e0, n0 = n0, e1 = e1, n1 = n1, data = dat.ad[21,], all = TRUE, methods = c("OR"), alpha = 0.05, OR = 2) out7 plot(out7)
Produces fragility index or fragility quotient for altering statistical significance of an individual study with a binary outcome at different significance levels.
frag.study.alpha(e0, n0, e1, n1, data, methods, modify0 = "both", modify1 = "both", alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 100, alternative = "two.sided", OR = 1, RR = 1, RD = 0)
frag.study.alpha(e0, n0, e1, n1, data, methods, modify0 = "both", modify1 = "both", alpha.from = 0.005, alpha.to = 0.05, alpha.breaks = 100, alternative = "two.sided", OR = 1, RR = 1, RD = 0)
e0 |
a numeric value or the corresponding column name in the argument |
n0 |
a numeric value or the corresponding column name in the argument |
e1 |
a numeric value or the corresponding column name in the argument |
n1 |
a numeric value or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the individual study with a binary outcome. If |
methods |
a character string or a vector of character strings indicating the method(s) used to calculate the p-value(s) of the association between treatment and outcome. It must consist of |
modify0 |
a character string indicating the event status modifications in group 0. It should be one of |
modify1 |
a character string indicating the event status modifications in group 1. It has the same usage with |
alpha.from |
a numeric value between 0 and 1, indicating the smallest value of the statistical significance levels to be considered (the default is 0.005). It should be smaller than the argument |
alpha.to |
a numeric value between 0 and 1, indicating the largest value of the statistical significance levels to be considered (the default is 0.05). It should be larger than the argument |
alpha.breaks |
a positive integer indicating the number of statistical significance levels to be considered (the default is 100). The candidate significance levels are thus equally-spaced between |
alternative |
a character string of either |
OR |
a numeric positive value indicating the value of odds ratio under the null hypothesis (the default is 1). It is used only if the argument |
RR |
a numeric positive value indicating the value of relative risk under the null hypothesis (the default is 1). It is used only if the argument |
RD |
a numeric value between |
An object of classes "frag.alpha"
and "frag.study.alpha"
. The object is a list containing the following components:
data |
original data in the form of 2 |
methods |
methods used to calculate the p-value(s) of the association between treatment and outcome. |
alphas |
different statistical significance levels. |
alternative |
alternative hypothesis. |
null |
values of odds ratio, relative risk, and risk difference under the null hypothesis; they are only used if |
modify0 |
type of event status modifications in group 0. |
modify1 |
type of event status modifications in group 1. |
f0.range |
range of event status modifications in group 0. |
f1.range |
range of event status modifications in group 0. |
pval |
p-value(s) produced by the method(s) included in the argument |
FI |
fragility indexes based on the method(s) at each statistical significance level in |
FI.avg |
average fragility index based on each method. |
FQ |
fragility quotients based on the method(s) at each statistical significance level in |
FQ.avg |
average fragility quotient based on each method. |
Of note, if both arguments modify0
and modify0
are "none"
(i.e., no modification), the items following pval
in the above list are not produced, because fragility cannot be assessed without event status modifications.
Benjamin DJ, Berger JO, Johannesson M, Nosek BA, Wagenmakers EJ, Berk R, Bollen KA, Brembs B, Brown L, Camerer C, Cesarini D, Chambers CD, Clyde M, Cook TD, De Boeck P, Dienes Z, Dreber A, Easwaran K, Efferson C, Fehr E, Fidler F, Field AP, Forster M, George EI, Gonzalez R, Goodman S, Green E, Green DP, Greenwald AG, Hadfield JD, Hedges LV, Held L, Ho TH, Hoijtink H, Hruschka DJ, Imai K, Imbens G, Ioannidis JPA, Jeon M, Jones JH, Kirchler M, Laibson D, List J, Little R, Lupia A, Machery E, Maxwell SE, McCarthy M, Moore DA, Morgan SL, Munafo M, Nakagawa S, Nyhan B, Parker TH, Pericchi L, Perugini M, Rouder J, Rousseau J, Savalei V, Schonbrodt FD, Sellke T, Sinclair B, Tingley D, Van Zandt T, Vazire S, Watts DJ, Winship C, Wolpert RL, Xie Y, Young C, Zinman J, Johnson VE (2018). "Redefine statistical significance." Nature Human Behaviour, 2, 6–10. <doi:10.1038/s41562-017-0189-z>
Ioannidis JPA (2018). "The proposal to lower P value thresholds to .005." JAMA, 319(14), 1429–30. <doi:10.1001/jama.2018.1536>
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>
frag.study
for assessing fragility of an individual study at a specific significance level.
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of trial 13 at multiple significance levels out1 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,]) out1 ## Generate plots to show the change of fragility measure, ## where the default plot is for the first method ## (i.e., Fisher's exact test) if the argument method is not specified plot(out1) ## The plot for odds ratio plot(out1, method = "OR") ## Change the choices of significance levels out2 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,], methods = "OR", alpha.from = 0.001, alpha.to = 0.1, alpha.breaks = 500) out2 plot(out2) ## Generate the plot with the x-axis on the log scale plot(out2, log = "x") ## Generate the plot for fragility quotient (in percentage) plot(out2, fragility = "FQ", log = "x") ## Generate the plot for fragility quotient (in decimal form) plot(out2, fragility = "FQ", percentage = FALSE, log = "x") ## Change the size of points plot(out2, cex.pts = 1, log = "x") ## Change the colors plot(out2, col.line = "blue", col.pval = "orange", col.sig = c("gray", "black"), log = "x") ## Change the line type plot(out2, lty.pval = 3, log = "x") ## Change the line width plot(out2, lwd = 2, lwd.pval = 2, log = "x") ## Change the point symbol plot(out2, pch = 1, log = "x")
## Load datasets of trials on antidepressant drugs data(dat.ad) ## Assess fragility of trial 13 at multiple significance levels out1 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,]) out1 ## Generate plots to show the change of fragility measure, ## where the default plot is for the first method ## (i.e., Fisher's exact test) if the argument method is not specified plot(out1) ## The plot for odds ratio plot(out1, method = "OR") ## Change the choices of significance levels out2 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,], methods = "OR", alpha.from = 0.001, alpha.to = 0.1, alpha.breaks = 500) out2 plot(out2) ## Generate the plot with the x-axis on the log scale plot(out2, log = "x") ## Generate the plot for fragility quotient (in percentage) plot(out2, fragility = "FQ", log = "x") ## Generate the plot for fragility quotient (in decimal form) plot(out2, fragility = "FQ", percentage = FALSE, log = "x") ## Change the size of points plot(out2, cex.pts = 1, log = "x") ## Change the colors plot(out2, col.line = "blue", col.pval = "orange", col.sig = c("gray", "black"), log = "x") ## Change the line type plot(out2, lty.pval = 3, log = "x") ## Change the line width plot(out2, lwd = 2, lwd.pval = 2, log = "x") ## Change the point symbol plot(out2, pch = 1, log = "x")
Visualizes the fragility at different statistical significance levels.
## S3 method for class 'frag.alpha' plot(x, method, fragility = "FI", percentage = TRUE, xlab, ylab, xlim, ylim, cex.pts, col.line, col.pval, col.sig, lty.pval, lwd, lwd.pval, pch, pch.na, tid1, tid2, FQ.nma = FALSE, ...)
## S3 method for class 'frag.alpha' plot(x, method, fragility = "FI", percentage = TRUE, xlab, ylab, xlim, ylim, cex.pts, col.line, col.pval, col.sig, lty.pval, lwd, lwd.pval, pch, pch.na, tid1, tid2, FQ.nma = FALSE, ...)
x |
an object of class |
method |
a character string indicating the method used to calculate the p-value when |
fragility |
a character string of either |
percentage |
a logical value indicating whether the fragility quotient is presented in percentage ( |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
xlim |
the x limits |
ylim |
the y limits |
cex.pts |
the size of points in the plot (the default is 0.5). |
col.line |
the color of the line segments that join the points (the default is |
col.pval |
the color of the vertical line depicting the p-value of the original data (the default is |
col.sig |
a vector of the two colors for two directions of significance change. The default includes |
lty.pval |
the type of the vertical line depicting the p-value of the original data. The default is 2 (dashed). It is only used when the p-value is between the lower and upper limits of the considered significance levels. |
lwd |
the width of the line segments that join the points (the default is 1). |
lwd.pval |
the width of the vertical line depicting the p-value of the original data. The default is 1. It is only used when the p-value is between the lower and upper limits of the considered significance levels. |
pch |
the symbol of points in the plot. The default is 16 (filled circle). |
pch.na |
the symbol of points depicting fragility index/quotient = |
tid1 |
the first treatment of the comparison of interest; if not specified, the first comparison in |
tid2 |
the second treatment of the comparison of interest. Only one comparison can be specified by |
FQ.nma |
a logical value indicating whether the fragility quotient in a network meta-analysis is the total sample size associated with the specific treatment comparison ( |
... |
other arguments that can be passed to |
A scatter plot is generated, where the x axis presents the different significance levels, and the y axis presents the corresponding fragility indexes or fragility quotients.
None.
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>
frag.study.alpha
, frag.ma.alpha
, and frag.nma.alpha
for assessing fragility of an individual study, a meta-analysis, and a network meta-analysis at multiple significance levels, respectively.
Visualizes the iterative process of event status modifications for deriving the fragility index/quotient of a meta-analysis with a binary outcome.
## S3 method for class 'frag.ma' plot(x, xlab, ylab, xlim, ylim, ybreaks = NULL, study.marker = TRUE, cex.marker, offset.marker, col.line, lwd, legend, x.legend, y.legend, cex.legend, ...)
## S3 method for class 'frag.ma' plot(x, xlab, ylab, xlim, ylim, ybreaks = NULL, study.marker = TRUE, cex.marker, offset.marker, col.line, lwd, legend, x.legend, y.legend, cex.legend, ...)
x |
an object of class |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
xlim |
the x limits |
ylim |
the y limits |
ybreaks |
a vector of the two numeric values for breaking the y axis or |
study.marker |
a logical value indicating whether study labels involved in event status modifications are presented in the plot (the default is |
cex.marker |
the size of study labels (when |
offset.marker |
a numeric value controlling the distance between study labels from the lines (the default is 0.2). It is passed to the function |
col.line |
a vector of the two colors for two lines representing the event status modifications in groups 0 and 1. The default includes |
lwd |
the width of the lines (the default is 1). |
legend |
the legend of plot. The default gives the two groups. |
x.legend |
the x co-ordinate or a keyword, such as |
y.legend |
the y co-ordinate to be used to position the legend (the default is |
cex.legend |
the size of legend text (the default is 1). |
... |
other arguments that can be passed to |
A plot showing the iterative process of event status modifications is generated. The x axis presents the iterations, and the y axis gives the group-specific total event counts.
None.
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>
Visualizes the fragility of multiple studies or multiple meta-analyses with binary outcomes.
## 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, ...)
## 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, ...)
x |
an object of class |
method |
a character string indicating the method used to calculate the p-value when |
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 |
fragility |
a character string of either |
percentage |
a logical value indicating whether the fragility quotient is presented in percentage ( |
max.f |
a positive numeric value indicating the maximum fragility index/quotient to be presented in the plot. Fragility indexes/quotients larger than |
bar |
a logical value indicating whether a bar plot ( |
names.arg |
a vector of names to be plotted below each bar. It is only used in the bar plot ( |
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 ( |
breaks |
the breaks on the x axis in the histogram. It is only used when |
freq |
a logical value indicating whether the y axis in the histogram presents frequencies ( |
reverse |
a logical value indicating whether the groups of two directions of significance change. It is only used when |
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 |
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 |
trun.marker |
a logical value indicating whether a text is placed at place of truncated fragility measures (the default is |
... |
other arguments that can be passed to |
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.
None.
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>
frag.studies
and frag.mas
for assessing fragility of multiple studies and multiple meta-analyses, respectively.
Visualizes the iterative process of event status modifications for deriving the fragility index/quotient of a network meta-analysis with a binary outcome.
## S3 method for class 'frag.nma' plot(x, tid1, tid2, xlab, ylab, xlim, ylim, ybreaks = NULL, study.marker = TRUE, cex.marker, offset.marker, col.line, lwd, legend, x.legend, y.legend, cex.legend, ...)
## S3 method for class 'frag.nma' plot(x, tid1, tid2, xlab, ylab, xlim, ylim, ybreaks = NULL, study.marker = TRUE, cex.marker, offset.marker, col.line, lwd, legend, x.legend, y.legend, cex.legend, ...)
x |
an object of class |
tid1 |
the first treatment of the comparison of interest; if not specified, the first comparison in |
tid2 |
the second treatment of the comparison of interest. Only one comparison can be specified by |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
xlim |
the x limits |
ylim |
the y limits |
ybreaks |
a vector of the two numeric values for breaking the y axis or |
study.marker |
a logical value indicating whether study labels involved in event status modifications are presented in the plot (the default is |
cex.marker |
the size of study labels (when |
offset.marker |
a numeric value controlling the distance between study labels from the lines (the default is 0.2). It is passed to the function |
col.line |
a vector of the two colors for two lines representing the event status modifications in the two treatment groups. The default includes |
lwd |
the width of the lines (the default is 1). |
legend |
the legend of plot. The default gives the two groups. |
x.legend |
the x co-ordinate or a keyword, such as |
y.legend |
the y co-ordinate to be used to position the legend (the default is |
cex.legend |
the size of legend text (the default is 1). |
... |
other arguments that can be passed to |
A plot showing the iterative process of event status modifications is generated for a specific treatment comparison. The x axis presents the iterations, and the y axis gives the group-specific total event counts.
None.
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>
Visualizes the fragility of an individual study with a binary outcome.
## S3 method for class 'frag.study.all' plot(x, method, modify0, modify1, trun, xlab, ylab, xlim, ylim, cex.pts, cex.legend.pval, cex.legend.title, col.ori, col.ori.hl, col.f.hl, col.sig, lty.ori, lwd.ori, pch, pch.ori, pch.ori.hl, pch.f, pch.f.hl, pch.trun, adjust.legend, adjust.seg, legend.pvals, ...)
## S3 method for class 'frag.study.all' plot(x, method, modify0, modify1, trun, xlab, ylab, xlim, ylim, cex.pts, cex.legend.pval, cex.legend.title, col.ori, col.ori.hl, col.f.hl, col.sig, lty.ori, lwd.ori, pch, pch.ori, pch.ori.hl, pch.f, pch.f.hl, pch.trun, adjust.legend, adjust.seg, legend.pvals, ...)
x |
an object of class |
method |
a character string ( |
modify0 |
a logical value indicating whether event status is modified in group 0 for plotting. The default is |
modify1 |
a logical value indicating whether event status is modified in group 1 for plotting. The default is |
trun |
a positive numeric value indicating truncation of p-value (on a base-10 logarithmic scale); p-values smaller than this threshold (10^ |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
xlim |
the x limits |
ylim |
the y limits |
cex.pts |
the size of points in the plot (the default is 0.5). |
cex.legend.pval |
the text size of p-values in the legend (the default is 0.6). It is only used when both arguments |
cex.legend.title |
the size of the legend title (the default is 1). It is only used when both arguments |
col.ori |
the color of the line(s) depicting the original data (without event status modifications). The default is |
col.ori.hl |
the color of the point depicting the original data (without event status modifications). The default is |
col.f.hl |
the color of the point(s) for highlighting the minimal event status modifications for altering statistical significance or non-significance. The default is |
col.sig |
a vector of two colors for non-significant and significant results, accordingly. The default includes |
lty.ori |
the type of the line(s) depicting the original data (without event status modifications). The default is 2 (dashed). |
lwd.ori |
the width of the line(s) depicting the original data (without event status modifications). The default is 1. |
pch |
the symbol of the points in the plot. The default is 16 (filled circle) when both arguments |
pch.ori |
the symbol of the point depicting the original data (without event status modifications). The default is 15 (filled square). |
pch.ori.hl |
the symbol of the point for highlighting the original data (without event status modifications). The default is 0 (square). It is only used when both arguments |
pch.f |
the symbol of the point depicting the original data (without event status modifications). The default is 15 (filled square). |
pch.f.hl |
the symbol of the point(s) for highlighting the minimal event status modifications for altering statistical significance or non-significance. The default is 2 (triangle point up). It is only used when both arguments |
pch.trun |
the symbol of the point(s) depicting truncated p-values. The default is 3 (plus). It is only used when only one of the arguments |
adjust.legend |
a positive numeric value for adjusting the width of the legend of p-values. The default is 1. |
adjust.seg |
a positive integer for adjusting the number of segments in the legend of p-values. The default is 10. |
legend.pvals |
a numeric value or a vector of numeric values that give additional p-values (e.g., 0.005 and 0.1) to be shown in the legend. The default is |
... |
other arguments that can be passed to |
When both arguments modify0
and modify1
are TRUE
, the generated plot presents p-values (with different colors representing their magnitudes) based on all possible event status modifications. The modifications in group 0 are presented on the x axis, and those in group 1 are presented on the y axis. When only one of the arguments modify0
and modify1
is TRUE
, a scatter plot is generated, which presents p-values (on a base-10 logarithmic scale) on the y axis against event status modifications in group 0 (if modify0
= TRUE
) or group 1 (if modify1
= TRUE
) on the x axis.
None.
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>
Prints information about the fragility of a meta-analysis with a binary outcome.
## S3 method for class 'frag.ma' print(x, ...)
## S3 method for class 'frag.ma' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output includes the characteristics of the meta-analysis (the number of studies, events, and samples), the estimated overall effect size, the information about significance (the pre-specified significance level, the null value, the confidence interval, and the p-value), and the fragility index and quotient.
None.
Prints information about the fragility of a meta-analysis with a binary outcome at different statistical significance levels.
## S3 method for class 'frag.ma.alpha' print(x, ...)
## S3 method for class 'frag.ma.alpha' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output includes the characteristics of the meta-analysis (the number of studies, events, and samples), the estimated overall effect size, the information about significance (the range of considered significance levels, the null value, and the p-value), and the averages, minimums, and maximums of fragility index and fragility quotient across different statistical significance levels.
None.
Prints information about the fragility of multiple meta-analyses with binary outcomes.
## S3 method for class 'frag.mas' print(x, ...)
## S3 method for class 'frag.mas' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output includes the number of meta-analyses, the pre-specified significance level, the null value of effect size, and the descriptive information about the fragility of the multiple meta-analyses, such as the median, range (from minimum to maximum), and interquartile range (IQR, from the first quartile to the third quartile) of fragility index and those of fragility quotient.
None.
Prints information about the fragility of a network meta-analysis with a binary outcome.
## S3 method for class 'frag.nma' print(x, ...)
## S3 method for class 'frag.nma' print(x, ...)
x |
an object of class |
... |
other arguments. |
Due to the space limit, the output only includes the basic characteristics of the network meta-analysis (the numbers of studies and treatments), the effect size, and the brief information about fragility index and quotient. More information can be retrieved from the list object x
. For example, the estimated effect sizes can be retrieved from x$est.ori
, and the directions of significance change corresponding to the fragility index/quotient can be retrieved from x$dir
.
None.
Prints information about the fragility of treatment comparison(s) in a network meta-analysis with a binary outcome at different statistical significance levels.
## S3 method for class 'frag.nma.alpha' print(x, ...)
## S3 method for class 'frag.nma.alpha' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output includes the basic characteristics of the network meta-analysis (the numbers of studies and treatments), the effect size, and the brief information about the averages of fragility indexes and fragility quotients across different statistical significance levels. More information can be retrieved from the list object x
. For example, the fragility indexes at different significance levels can be retrieved from x$FI
.
None.
Prints information about the fragility of multiple individual studies with binary outcomes.
## S3 method for class 'frag.studies' print(x, ...)
## S3 method for class 'frag.studies' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output consists of two parts: 1) the information about the number of studies, the pre-specified significance level, null value(s) (if the odds ratio, relative risk, and/or risk difference are used), the method(s) used to produce p-value(s), and the alternative hypothesis; and 2) the information about the fragility of the multiple studies, including the median, range (from minimum to maximum), and interquartile range (IQR, from the first quartile to the third quartile) of fragility index and those of fragility quotient based on each method considered. The second part about the fragility presents the information grouped by the direction of significance change (significance altered to non-significance and non-significance altered to significance) as well as the overall (ungrouped) information. If both groups have no event status modifications, the second part will not be printed because the fragility needs to be assessed based on certain event status modifications.
None.
Prints information about the fragility of an individual study with a binary outcome.
## S3 method for class 'frag.study' print(x, ...)
## S3 method for class 'frag.study' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output consists of three parts: 1) the information about the original data, where the 22 table and the ranges of event status modifications in both groups are presented; 2) the information about the significance, including the pre-specified significance level, null value(s) (if the odds ratio, relative risk, and/or risk difference are used), and the p-value(s) with the associated method and the alternative hypothesis; and 3) the information about the fragility, including the fragility index and fragility quotient based on each method considered, the direction of significance change, and the corresponding minimal event status modification(s) for altering significance or non-significance. If both groups have no event status modifications, the third part will not be printed because the fragility needs to be assessed based on certain event status modifications.
None.
Prints information about the fragility of an individual study with a binary outcome at different statistical significance levels.
## S3 method for class 'frag.study.alpha' print(x, ...)
## S3 method for class 'frag.study.alpha' print(x, ...)
x |
an object of class |
... |
other arguments. |
The output consists of three parts: 1) the information about the original data, where the 22 table and the ranges of event status modifications in both groups are presented; 2) the information about the significance, including the pre-specified significance level, null value(s) (if the odds ratio, relative risk, and/or risk difference are used), and the p-value(s) with the associated method and the alternative hypothesis; and 3) the information about the fragility, including the averages, minimums, and maximums of fragility index and fragility quotient based on each method considered across different statistical significance levels. If both groups have no event status modifications, the third part will not be printed because the fragility needs to be assessed based on certain event status modifications.
None.