razao_variancia_piloto: Pilot-sample variance estimate for the ratio estimator

View source: R/cap07-tamanho-guarda-chuva.R

razao_variancia_pilotoR Documentation

Pilot-sample variance estimate for the ratio estimator

Description

Computes s_r^2, the pilot-sample estimate of the population variance of the ratio estimator (Eq. 7.42 of the course notes), used as an input to razao_tamanho_R(), razao_tamanho_total(), and razao_tamanho_media() when no prior estimate of the variance is available.

Usage

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

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, X

Ignored (kept for signature symmetry with razao_estima_R() so a full problem statement can be passed without error) – s_r^2 itself does not require them.

...

Ignored (see package overview on tolerated extra arguments).

Value

A sampling_result object with s_r^2.

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_variancia_piloto(x = x, y = y)

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