fisher_power_curve: Create a Power Curve for Fisher's Exact

View source: R/fisher-power-curve.R

fisher_power_curveR Documentation

Create a Power Curve for Fisher's Exact

Description

Generates data for a power curve where power is empirically estimated over a range of sample size values.

S3 print method for fisher_power_curve objects.

S3 plot method for fisher_power_curve objects.

Usage

fisher_power_curve(n_vec, p = 0.85, p_diff = -0.1, nsim = 200L, ...)

## S3 method for class 'fisher_power_curve'
print(x, ...)

## S3 method for class 'fisher_power_curve'
plot(x, ...)

Arguments

n_vec

integer(n). A sequence of sample sizes per group to evaluate the corresponding power.

p

double(1). Binomial probability of group 1 (the base group).

p_diff

double(1) in ⁠(-1, 1)⁠. The difference from p of group 2. Can be negative.

nsim

integer(1). Number of simulations to perform in estimating power, (1 - \beta).

...

Arguments passed to fisher_power().

x

A fisher_power_curve class object.

See Also

t_power_curve()

Examples

tbl <- fisher_power_curve(seq(50, 400, 10), nsim = 100L)
tbl

plot(tbl)

stufield/power documentation built on June 1, 2025, 7:16 p.m.