aas_estima_proporcao: Estimate a population proportion under simple random sampling...

View source: R/cap03-aas.R

aas_estima_proporcaoR Documentation

Estimate a population proportion under simple random sampling (AAS)

Description

Estimates a population proportion from a simple random sample, with or without replacement. Corresponds to Eqs. (3.16)-(3.21) (AASc) and (3.39)-(3.44) (AASs) of the course notes.

Usage

aas_estima_proporcao(
  x,
  N = NULL,
  reposicao = c("sem", "com"),
  conf = 0.95,
  ...
)

Arguments

x

Numeric or logical vector coded 0/1 (or FALSE/TRUE).

N

Optional population size. If NULL or Inf, the population is treated as unknown/very large (the finite-population correction 1 - n/N is dropped, i.e. f = 0), which also makes the "com" ("with replacement") and "sem" ("without replacement") results coincide.

reposicao

Either "sem" (without replacement, AASs – the default and the usual case in practice) or "com" (with replacement, AASc).

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.

References

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

Examples

aas_estima_proporcao(c(1, 0, 1, 1, 0, 1, 0, 0), N = 500)

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