Produce a sample size table giving the minimum sample size per cluster for given values of the ICC and the prevalence threshold against which we are comparing.

get_sample_size_table(
  prevalence = seq(0, 0.2, 0.01),
  ICC = 0.05,
  prev_thresh = 0.05
)

Arguments

prevalence

the assumed true prevalence of pfhrp2/3 deletions in the domain. Allowed values are anything in seq(0, 0.2, 0.01), including vectors of values.

ICC

the assumed intra-cluster correlation. Allowed values are" {0, 0.01, 0.02, 0.05, 0.1, 0.2}.

prev_thresh

the prevalence threshold against which we are comparing. Allowed values are: {0.05, 0.08, 0.1}.

Details

The function get_power_threshold() was run over a large range of parameter combinations and results were stored within the df_sim object (see ?df_sim). These simulations were then used to produce minimum sample size estimates by linear interpolation that were stored within the df_ss object (see ?df_ss). This function provides a simple way of querying the df_ss object for given parameter values.

Examples

get_sample_size_table()
#> # A tibble: 19 × 21
#>    n_clust `0.01` `0.02` `0.03` `0.04` `0.05` `0.06` `0.07` `0.08` `0.09` `0.1`
#>      <int>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl> <dbl>
#>  1       2     NA     NA     NA     NA     NA     NA     NA     NA     NA    NA
#>  2       3     NA     NA     NA     NA     NA     NA     NA     NA     NA    NA
#>  3       4     NA     NA     NA     NA     NA     NA     NA     NA     NA    NA
#>  4       5     NA     NA     NA     NA     NA     NA     NA     NA     NA   496
#>  5       6     NA     NA     NA     NA     NA     NA     NA     NA     NA   113
#>  6       7     NA     NA     NA     NA     NA     NA     NA     NA     NA    68
#>  7       8     NA     NA     NA     NA     NA     NA     NA     NA    416    51
#>  8       9     NA     NA     NA     NA     NA     NA     NA     NA    138    37
#>  9      10     NA     NA     NA     NA     NA     NA     NA     NA     85    30
#> 10      11     NA     NA     NA     NA     NA     NA     NA     NA     66    25
#> 11      12     NA     NA     NA     NA     NA     NA     NA     NA     45    22
#> 12      13     NA     NA     NA     NA     NA     NA     NA     NA     40    17
#> 13      14     NA     NA     NA     NA     NA     NA     NA    438     34    15
#> 14      15     NA     NA     NA     NA     NA     NA     NA    179     29    14
#> 15      16     NA     NA     NA     NA     NA     NA     NA    122     28    13
#> 16      17     NA     NA     NA     NA     NA     NA     NA    122     22    11
#> 17      18     NA     NA     NA     NA     NA     NA     NA     84     21    11
#> 18      19     NA     NA     NA     NA     NA     NA     NA     70     19    10
#> 19      20     NA     NA     NA     NA     NA     NA     NA     67     18     9
#> # ℹ 10 more variables: `0.11` <dbl>, `0.12` <dbl>, `0.13` <dbl>, `0.14` <dbl>,
#> #   `0.15` <dbl>, `0.16` <dbl>, `0.17` <dbl>, `0.18` <dbl>, `0.19` <dbl>,
#> #   `0.2` <dbl>