AI4OfficialStats: Audit Statistical Fidelity of AI-Mediated Official Statistics

Provides deterministic tools for auditing whether artificial intelligence systems preserve the numerical, semantic, contextual, temporal, geographic, unit, provenance, revision, transformation, and uncertainty properties of official statistics. Structured reference statistics and machine-generated claims can be compared using non-compensatory critical-error rules, weakest-link and geometric fidelity summaries, provenance graphs, and portable SHA-256 proof bundles. The package provides bounded connectors for official statistical services, an easy schema-detection and file-import layer for arbitrary official organisations, extensible provider registries, and a search-first natural- language verification layer that classifies statistical claims, selects suitable official sources, retrieves candidate evidence, matches statistical dimensions, and compares claimed values. If no reference year is stated, verification uses the latest available matching official observation and discloses the resolved year. Source attribution is optional: automatic routing can choose suitable providers when none is named, while explicitly named supported sources are respected by default. Automatic catalogue-to-observation verification is implemented for the World Bank, WHO, the United Nations Statistics Division Sustainable Development Goals service, and the European Commission statistical service, while other providers remain available through bounded direct connectors or generic official-data import. Prompt perturbation, statistical red-team generation, minimal-pair tests, and benchmark data support reproducible evaluation of generative, retrieval-augmented, and agentic statistical systems. An embedded alignment layer maps claim-level controls to relevant activities of the Generic Statistical Business Process Model (GSBPM) 5.2, including Analyse, Disseminate, Evaluate, Quality Management, and Metadata Management.

Version: 0.2.0
Depends: R (≥ 4.1.0)
Imports: digest, jsonlite, stats, utils
Suggests: testthat (≥ 3.0.0), readxl
Published: 2026-09-24
DOI: 10.32614/CRAN.package.AI4OfficialStats
Author: Hossein Hassani [aut], Steve MacFeely [aut], Leila Marvian Mashhad [aut, cre]
Maintainer: Leila Marvian Mashhad <leila.marveian at gmail.com>
License: MIT + file LICENSE
NeedsCompilation: no
Citation: AI4OfficialStats citation info
Materials: README, NEWS
CRAN checks: AI4OfficialStats results

Documentation:

Reference manual: AI4OfficialStats.html , AI4OfficialStats.pdf

Downloads:

Package source: AI4OfficialStats_0.2.0.tar.gz
Windows binaries: r-devel: AI4OfficialStats_0.1.0.zip, r-release: not available, r-oldrel: AI4OfficialStats_0.1.0.zip
macOS binaries: r-release (arm64): AI4OfficialStats_0.2.0.tgz, r-oldrel (arm64): AI4OfficialStats_0.2.0.tgz, r-release (x86_64): AI4OfficialStats_0.2.0.tgz, r-oldrel (x86_64): AI4OfficialStats_0.2.0.tgz
Old sources: AI4OfficialStats archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=AI4OfficialStats to link to this page.