Skip to contents

[Experimental]

This function performs sample size computation for testing one proportion in accordance with Chinese NMPA's IVD guideline.

Usage

size_one_prop(
  p1,
  p0,
  alpha = 0.05,
  power = 0.8,
  alternative = c("two.sided", "less", "greater")
)

Arguments

p1

(numeric)
expected criteria of the evaluated assay.

p0

(numeric)
acceptable criteria of the evaluated assay.

alpha

(numeric)
type-I-risk, \(\alpha\).

power

(numeric)
Power of test, equal to 1 minus type-II-risk (\(\beta\)).

alternative

(string)
string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

Value

an object of size class that contains the sample size and relevant parameters.

References

Chinese NMPA's IVD technical guideline.

Examples

size_one_prop(p1 = 0.95, p0 = 0.9, alpha = 0.05, power = 0.8)
#> 
#>  Sample size determination for one Proportion 
#> 
#>  Call: size_one_prop(p1 = 0.95, p0 = 0.9, alpha = 0.05, power = 0.8)
#> 
#>    optimal sample size: n = 239 
#> 
#>    p1:0.95 p0:0.9 alpha:0.05 power:0.8 alternative:two.sided