View source: R/cap04-estratificada-tamanho.R
| estr_tamanho_amostra | R Documentation |
Convenience "umbrella" function analogous to aas_tamanho_amostra():
accepts every input potentially relevant to a stratified sample-size
problem and dispatches to estr_tamanho_media() or
estr_tamanho_proporcao() depending on parametro, ignoring whichever
inputs are not needed.
estr_tamanho_amostra(
parametro = c("media", "proporcao"),
Nk,
sigmak2 = NULL,
pk = NULL,
d,
conf = 0.95,
ck = NULL,
alocacao = c("proporcional", "neyman", "custo", "nenhuma"),
arredondar = c("cima", "proximo"),
...
)
parametro |
Either |
Nk |
Numeric vector with the population size of each stratum. |
sigmak2 |
Numeric vector with the population variance of each stratum. |
pk |
Numeric vector with the population proportion of each stratum
(used only when |
d |
Tolerable margin of error. |
conf |
Confidence level, default |
ck |
Optional numeric vector with the sampling cost per unit in each stratum. If supplied, the cost-based formula (Eq. 4.8) is used; otherwise the standard formula (Eq. 4.5) is used. |
alocacao |
How to allocate |
arredondar |
Either |
... |
Ignored. Any other variables from a broader problem statement may be passed here without causing an error. |
A sampling_result object, as produced by
estr_tamanho_media() or estr_tamanho_proporcao().
estr_tamanho_amostra(parametro = "media", Nk = c(1540, 770, 385),
sigmak2 = c(7, 9, 11), d = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.