View source: R/cap06-conglomerados-1etapa.R
| cong1_estima_proporcao | R Documentation |
Analogous to cong1_estima_media() but for a population proportion,
following Eqs. (6.7)-(6.10) of the course notes.
cong1_estima_proporcao(yi, Mi, Nc, M = NULL, conf = 0.95, ...)
yi |
Numeric vector with the number of "successes" (elements with the characteristic of interest) in each sampled cluster. |
Mi |
Numeric vector with the number of elements in each sampled cluster. |
Nc |
Total number of clusters in the population. |
M |
Optional total number of elements in the population (see
|
conf |
Confidence level, default |
... |
Ignored (see package overview on tolerated extra arguments). |
A sampling_result object with the estimated proportion,
variance, and confidence interval.
# Exemplo 6.3 (proporcao de alunos com peso acima da mediana)
cong1_estima_proporcao(
yi = c(7, 6, 5, 6, 5, 7, 5, 6, 6, 6),
Mi = c(20, 16, 17, 21, 16, 25, 21, 26, 25, 23),
Nc = 373, M = 8018
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.