Calculates the minimum sample size required per cluster to achieve a certain power for the case of a clustered prevalence survey where the aim is to detect the presence of any deletions over all clusters (see ?get_power_presence()). Assumes the same sample size per cluster.

get_sample_size_presence(
  n_clust,
  target_power = 0.8,
  prevalence = 0.01,
  ICC = 0.05,
  N_max = 2000
)

Arguments

n_clust

the number of clusters.

target_power

the power we are aiming to achieve.

prevalence

assumed true prevalence of pfhrp2/3 deletions as a proportion between 0 and 1.

ICC

assumed true intra-cluster correlation (ICC) between 0 and 1.

N_max

the maximum allowed sample size. Sample sizes are only explored up to this value, after which point an error is returned.

Examples

get_sample_size_presence(n_clust = 5, prevalence = 0.01, ICC = 0.1)
#> [1] 294