A clustered design does not reduce the sample size, it reduces the
information: the effective sample size is n / DEFF. Both tails
are kept, so a zero effect returns alpha exactly rather than alpha/2.
Details
Formula: n_eff = n / DEFF;
power = Phi(d sqrt(n_eff) - z) + Phi(-d sqrt(n_eff) - z) with
z = Phi^-1(1 - alpha/2).
References
Lumley, T. (2010). Complex Surveys: A Guide to Analysis Using R, Wiley. doi:10.1002/9780470580066 . Standard form.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Powsrv(V)
#> $estimate
#> [1] 1 1 1 1 1 1 1 1
#>
#> $power
#> [1] 1 1 1 1 1 1 1 1
#>
#> $n_eff
#> [1] 100
#>
#> $ncp
#> [1] 10 20 30 40 50 60 70 80
#>
#> $z_crit
#> [1] 1.959964
#>
#> $DEFF
#> [1] 1
#>
#> $n
#> [1] 100
#>
#> $method
#> [1] "Two-sided z power with the design effect discount"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
