Description Usage Arguments Value See Also Examples
The function computes minimal proportion for the given relative margin of error. The calculation takes into sample size, population size, margin of error, expected response rate and design effect.
1 | min_count(n, pop, RMoE, confidence = 0.95, R = 1, deff_sam = 1, deff_est = 1)
|
n |
The expected sample size. |
pop |
Population size. |
RMoE |
The expected relative margin of error. |
confidence |
Optional positive value for confidence interval. This variable by default is 0.95. |
R |
The expected response rate (optional). If not defined, it is assumed to be 1 (full-response). |
deff_sam |
The expected design effect of sample design for the estimates (optional). If not defined, it is assumed to be 1. |
deff_est |
The estimated design effect of estimator for the estimates (optional). If not defined, it is assumed to be 1. |
The estimate of minimal count of respondents for the given relative margin of error.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | min_count(n = 15e3, pop = 2e6, RMoE = 0.1)
## Not run:
library("data.table")
min_count(n = c(10e3, 15e3, 20e3), pop = 2e6, 0.1)
n <- seq(10e3, 30e3, length.out = 11)
# n <- sort(c(n, 22691))
n
RMoE <- seq(.02, .2, length.out = 10)
RMoE
dt <- data.table(n = rep(n, each = length(RMoE)), RMoE = RMoE)
dt[, Y := min_count(n = n, pop = 2.1e6, RMoE = RMoE, R = 1) / 1e3]
dt
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.