Skip to contents

Compares enemdu_kpi_employment() outputs against official INEC labor tabulations previously read with enemdu_read_official_labor_tabulados().

Usage

enemdu_compare_labor_tabulados(
  estimates,
  official,
  official_period = NULL,
  domain_group = "Nacional",
  domain_label = "Total",
  tolerance_count = 1,
  tolerance_rate = 5e-04,
  strict = FALSE
)

Arguments

estimates

A data frame returned by enemdu_kpi_employment() or another object with columns indicator_id and estimate.

official

A data frame returned by enemdu_read_official_labor_tabulados().

official_period

Optional official period to filter, such as "mar-26", "I - 2026" or "2025".

domain_group

Official domain group. Defaults to "Nacional".

domain_label

Official domain label. Defaults to "Total".

tolerance_count

Absolute tolerance for counts. Defaults to 1.

tolerance_rate

Absolute tolerance for rates in package scale. Defaults to 0.0005, equivalent to 0.05 percentage points.

strict

Logical. If TRUE, errors when at least one comparable indicator falls outside tolerance or is missing in package estimates.

Value

A tibble with official values, package estimates, differences and comparison status.

Details

This function is intentionally conservative. It compares only official rows whose estimator is Indicador, and only rows that can be mapped to an implemented indicator_id.