Skip to contents

Compares package NBI estimates against official benchmark rows when those rows are available. This helper is a readiness layer and does not claim official validation.

Usage

enemdu_compare_official_nbi(
  estimates,
  benchmarks = enemdu_official_nbi_benchmarks(),
  period = NULL,
  benchmark_set = NULL,
  domain_vars = NULL,
  domain_map = NULL,
  estimate_col = "estimate",
  indicator_col = "indicator_id",
  tolerance_pp = 0.1,
  strict = FALSE
)

Arguments

estimates

A data frame with NBI estimates.

benchmarks

Official NBI benchmark table.

period

Optional benchmark period filter.

benchmark_set

Optional benchmark set filter.

domain_vars

Optional package estimate domain variables. The first variable is used as the benchmark domain_type.

domain_map

Optional named vector mapping package domain values to benchmark domain values.

estimate_col

Estimate column in estimates.

indicator_col

Indicator id column in estimates.

tolerance_pp

Tolerance in percentage points.

strict

Logical. If TRUE, error when comparisons are missing or outside tolerance.

Value

A tibble with comparison metadata.