razao_estima_total: Ratio estimator of the population total

View source: R/cap07-razao.R

razao_estima_totalR Documentation

Ratio estimator of the population total

Description

Estimates the population total using the ratio estimator (Eq. 7.33-7.35 of the course notes).

Usage

razao_estima_total(
  x = NULL,
  y = NULL,
  n = NULL,
  sum_x = NULL,
  sum_y = NULL,
  sum_x2 = NULL,
  sum_y2 = NULL,
  sum_xy = NULL,
  N,
  X,
  conf = 0.95,
  ...
)

Arguments

x, y

Optional raw numeric vectors (sample data).

n, sum_x, sum_y, sum_x2, sum_y2, sum_xy

Optional pre-aggregated summary statistics, used when raw data are not available (e.g. a problem statement that only gives totals).

N

Population size.

X

Population total of the auxiliary variable (used to derive X_barra = X/N, required by Eq. 7.31).

conf

Confidence level, default 0.95.

...

Ignored (see package overview on tolerated extra arguments).

Value

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

Examples

x <- c(1, 30, 44, 20, 0, 10, 15, 5, 2, 50, 35, 25)
y <- c(2, 35, 50, 27, 1, 15, 17, 7, 0, 53, 35, 30)
razao_estima_total(x = x, y = y, N = 1500, X = 15000)

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