Skip to contents

The function optimizes the true positive rate for a range of sample sizes for several methods in the package.

Usage

tpr_optim(fun, range, tpr, ...)

Arguments

fun

Function. The sample size determining method to use.

range

Integer. Range of sample sizes of interest.

tpr

Numeric. The desired long-run probability.

...

Additional arguments to pass to `fun`.

delta

Numeric. The expected population effect size.

Value

The function returns a list of two. `n1` the resulting sample size and `tpr_out` the associated true positive rate with that sample size.