estr_tamanho_media: Sample size for stratified sampling: mean (proportional /...

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

estr_tamanho_mediaR Documentation

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

Description

Computes the total sample size and, when alocacao is not "nenhuma", the per-stratum allocation, to estimate a population mean under stratified sampling, dispatching automatically between the proportional/Neyman formula (Eq. 4.5) and the cost-based formula (Eq. 4.8) depending on whether ck is supplied. Extra arguments not needed for the chosen formula are ignored.

Usage

estr_tamanho_media(
  Nk,
  sigmak2,
  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.

sigmak2

Numeric vector with the population variance 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. If supplied, the cost-based formula (Eq. 4.8) is used; otherwise the standard formula (Eq. 4.5) is used.

alocacao

How to allocate n across strata once computed: "proporcional" (default), "neyman", "custo" (requires ck), or "nenhuma" (only the total n is returned).

arredondar

Either "cima" (default, always round up – the conventional, conservative practice) or "proximo" (round to the nearest integer, reproducing the course notes' worked examples, which use a 2-decimal critical value and round to the nearest integer).

...

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.

References

Cochran, W.G. (1977). Sampling Techniques, 3rd ed. Wiley, cap. 5.

Examples

estr_tamanho_media(Nk = c(1540, 770, 385), sigmak2 = c(7, 9, 11), d = 0.5, conf = 0.95)

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