bin.fi.exact: Exactly calculate a fragility index for 2x2 data (deprecated)

Description Usage Arguments Value Examples

View source: R/internal.R

Description

Exactly calculate a fragility index using a 2x2 table. Do a grid search over all FI values <= some value. This has been deprecated and will stop with an error to use bin.fi.exact2 instead, as it is more efficient.

Usage

1
bin.fi.exact(crosstab, get.p, alpha = 0.05, max.f = Inf, verbose = FALSE)

Arguments

crosstab

a 2x2 contingency table with treatments on rows and outcomes on columns

get.p

a function inputting a table and outputting a p-value

alpha

a string whose value being "exact" leads to an exact calculation

max.f

the maximum fragility index considered

verbose

a boolean value for whether to print progress percentages (in increments of roughly ten percent)

Value

a list containing the signed fragility index and other accompanying values, similar to greedy.fi.

Examples

1
2
3
4
5
x <- matrix(nrow = 2, byrow = TRUE, rgeom(4, 1 / 50))
colnames(x) <- c("event", "nonevent")
rownames(x) <- c("control", "treatment")
get.p <- function(tab) fisher.test(tab)$p.value
FragilityTools:::bin.fi.exact(x, get.p)

brb225/FragilityTools documentation built on Jan. 21, 2022, 1:26 a.m.