Description Usage Arguments Value Examples
This function implements the original algorithm to calculate a fragility index, as it was proposed by Walsh et al. (2014). The algorithm determines a single group in which to make outcome modifications. We also implement a variant which considers outcome modifications in both directions (i.e. increasing and decreasing event counts), which is a hybrid of the algorithm due to Walsh et al. (2014) and the algorithm commonly used for the "reverse" fragility index.
1 | bin.fi.walsh(crosstab, get.p, alpha = 0.05, dir = "both", group = "event")
|
crosstab |
a 2x2 contingency table with groups on the rows |
get.p |
a function which accepts a 2x2 matrix and outputs a p value |
alpha |
a numeric for the significance cutoff, 0.05 by default |
dir |
a character, either "left", "right", or "both". The default is "left". Walsh originally used 'left' which increases the outcome count in the left column (which is typically events) |
group |
a character specifying how to choose the single group in which to make modifications. The options are: 'event' for the fewest events (default), 'nonevent' for the fewest nonevents, or 'both' for the fewest overall. We assume that events are in the first column. |
a list containing the signed fragility index and other accompanying values,
similar to greedy.fi
.
1 | FragilityTools:::bin.fi.walsh(matrix(c(100, 96, 13, 28), nrow = 2), function(mat) fisher.test(mat)$p.value)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.