cong2_estima_proporcao: Estimate the population proportion under two-stage cluster...

View source: R/cap06-conglomerados-2etapas.R

cong2_estima_proporcaoR Documentation

Estimate the population proportion under two-stage cluster sampling

Description

Analogous to cong2_estima_media() but for a population proportion, following Eqs. (6.24)-(6.29) of the course notes. Note that, unlike cong2_estima_media(), the proportion estimator is inherently a ratio-type estimator (structurally analogous to cong2_estima_razao_media()) and therefore always uses the sample average cluster size m_barra = mean(Mi) in its variance formula, even when the population totals Nc/M are known – this is exactly how Example 6.6 of the course notes computes it (using m_barra = 52.2 rather than M/Nc = 50, even though both M and Nc are known in that example).

Usage

cong2_estima_proporcao(Mi, mi, pi_hat, Nc, M = NULL, conf = 0.95, ...)

Arguments

Mi

Numeric vector with the population size of each sampled cluster.

mi

Numeric vector with the number of sampled elements in each cluster.

pi_hat

Numeric vector with the sample proportion of each cluster (Eq. 6.24).

Nc

Total number of clusters in the population.

M

Ignored (kept for signature symmetry with cong2_estima_media() and so that extra arguments from a broader problem statement can be passed without error) – see Details.

conf

Confidence level, default 0.95.

...

Ignored (see package overview on tolerated extra arguments).

Value

A sampling_result object with the estimated proportion, its variance, and confidence interval.

Examples

Mi <- c(50, 65, 45, 48, 52, 58, 42, 66, 40, 56)
mi <- c(10, 13, 9, 10, 10, 12, 8, 13, 8, 11)
pi_hat <- c(0.4, 0.3077, 0.3333, 0.3, 0.3, 0.25, 0.375, 0.3077, 0.375, 0.3636)
cong2_estima_proporcao(Mi = Mi, mi = mi, pi_hat = pi_hat, Nc = 90)

sampleone documentation built on Oct. 13, 2026, 5:07 p.m.