bin.fi.samplesize: Sample size calculator for 2x2 tables, taking into account...

Description Usage Arguments

View source: R/front.R

Description

This function is a wrapper around general.fi.samplesize, see the documentation there.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
bin.fi.samplesize(
  min.fi = 10,
  min.power = 0.8,
  alpha = 0.05,
  tau = 0.5,
  test = "fisher",
  algorithm = "original",
  theta1 = 0.3,
  theta2 = 0.7,
  row.prop = 1/2,
  niters = 5,
  cl = NULL
)

Arguments

min.fi

the smallest acceptable QUANTILE fragility index. When NULL, the FI calculation is skipped and sample_size_init_fi is taken to produce the desired FI.

min.power

the smallest acceptable power. When NULL, the power calculation is skipped and sample_size_init_power is taken to produce the desired power.

alpha

a numeric for the size of the p value based test

tau

the quantile of FI to bound, default 1/2

test

a string specifying which p value based test to use. By default 'fisher' for Fisher's exact test. Can also specify chisq.prop for Pearson's chi square test.

algorithm

A string specifying the algorithm to use to calculate fragility indices. The default is "walsh" (or 'original'). Alternatives include "greedy" for using greedy.fi

theta1

a numeric for the event rate in the first group, for simulating the alternative model

theta2

a numeric for the event rate in the second group, for simulating the alternative model

row.prop

a numeric for the proportion of patients in the first group, for simulating the alternative model

niters

the number of iterations to run the algorithm. The final output is the median across iterations.


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