amostragem_comparar_planos: Compare the variance of different sampling plans for the same...

View source: R/utils-comparar-planos.R

amostragem_comparar_planosR Documentation

Compare the variance of different sampling plans for the same problem

Description

Convenience function that lines up the estimated variance obtained under different sampling designs (as returned by sampling_result objects from this package) so they can be compared directly, computing the sampling-plan effect (EPA / design effect) of each one relative to a chosen baseline. This operationalises the comparisons illustrated throughout the course notes (Section 3.7.7, Examples 4.4-4.5, and the design-effect discussion in Section 6.1.5).

Usage

amostragem_comparar_planos(..., referencia = NULL)

Arguments

...

Two or more named sampling_result objects (e.g. aas = aas_estima_media(...), estratificada = estr_estima_media(...)), each with a variancia element containing var_media or var_p.

referencia

Name of the plan to use as the baseline (denominator of the EPA ratio). Defaults to the first plan supplied.

Value

A sampling_result object with a comparison table of variances and EPA (design effect) ratios relative to referencia.

Examples

x <- rnorm(30, 50, 5)
plano_aas <- aas_estima_media(x, N = 300)
# (em um caso real, plano_estrat viria de estr_estima_media() com os
#  mesmos dados organizados em estratos)
amostragem_comparar_planos(aas = plano_aas)

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