Description Usage Arguments Value References See Also Examples

Produces fragility indexes or fragility quotients for altering statistical significance of multiple individual studies with binary outcomes.

1 2 3 | ```
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.

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | ```
## 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 representing 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("toprigh", 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))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.