estr_tamanho_proporcao: Sample size for stratified sampling: proportion (proportional...

View source: R/cap04-estratificada-tamanho.R

estr_tamanho_proporcaoR Documentation

Sample size for stratified sampling: proportion (proportional / Neyman / cost)

Description

Analogous to estr_tamanho_media() but for a population proportion, using Eq. (4.12), with per-stratum proportions substituting for variances (sigmak2 = pk*(1-pk)).

Usage

estr_tamanho_proporcao(
  Nk,
  pk,
  d,
  conf = 0.95,
  ck = NULL,
  alocacao = c("proporcional", "neyman", "custo", "nenhuma"),
  arredondar = c("cima", "proximo"),
  ...
)

Arguments

Nk

Numeric vector with the population size of each stratum.

pk

Numeric vector with the population proportion of each stratum.

d

Tolerable margin of error.

conf

Confidence level, default 0.95.

ck

Optional numeric vector with the sampling cost per unit in each stratum (Eq. 4.13).

alocacao

How to allocate n across strata: "proporcional" (default), "neyman", "custo" (requires ck), or "nenhuma".

arredondar

Either "cima" (default) or "proximo" – see estr_tamanho_media().

...

Ignored (see package overview on tolerated extra arguments).

Value

A sampling_result object with the total sample size and, unless alocacao = "nenhuma", the per-stratum allocation.

Examples

estr_tamanho_proporcao(Nk = c(1540, 770, 385), pk = c(0.75, 0.50, 0.25), d = 0.05)

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