mdiharmonize: Harmonize Confidential Firm-Level Microdata into a Common Format

Harmonizes confidential firm-level microdata held at national statistical institutes into one common structure, so that the same analysis code runs unchanged in every country. Metadata tables describe each institute's raw files and map their variables to the common ones; the functions read the raw files, apply the mapping (revaluing, recoding, reclassifying, redefining and remapping), make industry, product and regional classifications consistent over time, switch between enterprise, firm and plant identifiers, and add capital stocks computed with the perpetual inventory method. Quality checks on the harmonized data report duplicate keys, type conversion losses, breaks in yearly statistics and jumps in missing values, and outputs pass statistical disclosure control before they leave the institute. Builds on the analysis tools in 'mditools'. Capital stocks via the perpetual inventory method follow OECD (2009) <doi:10.1787/9789264068476-en>; disclosure control applies the minimum-frequency and dominance rules with secondary suppression described in Hundepool et al. (2012) <doi:10.1002/9781118348239>.

Version: 0.1.0
Imports: data.table, dplyr, grDevices, haven, igraph, mditools (≥ 0.1.1), openxlsx, stats, stringr, tools, utils
Suggests: askpass, bit64, ggplot2, gridExtra, readr, RODBC, testthat (≥ 3.0.0)
Published: 2026-11-04
DOI: 10.32614/CRAN.package.mdiharmonize (may not be active yet)
Author: Daniele Aglio [aut], Eric Bartelsman [aut], Julián Díaz-Acosta [aut], Mirja Hälbig [aut], Marco Miorandi [aut], Johanna Weiss [aut, cre], José Alberto Ferreira [ctb], Elena Sponga [ctb], Reetuparna Vishwanath [ctb], Chengzi Yi [ctb], Alessandro Zona Mattioli [ctb], European Union [fnd] (Technical Support Instrument (TSI), project ProdTool, TSI-2025-MULTIMSPROD-IBA, TSI Project Number 101261159)
Maintainer: Johanna Weiss <johanna.weiss at iwhesl.onmicrosoft.com>
BugReports: https://github.com/Secretariat-CompNet/mdiharmonize/issues
License: GPL-3
URL: https://github.com/Secretariat-CompNet/mdiharmonize
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: mdiharmonize results

Documentation:

Reference manual: mdiharmonize.html , mdiharmonize.pdf

Downloads:

Package source: mdiharmonize_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): mdiharmonize_0.1.0.tgz, r-oldrel (arm64): mdiharmonize_0.1.0.tgz, r-release (x86_64): mdiharmonize_0.1.0.tgz, r-oldrel (x86_64): mdiharmonize_0.1.0.tgz

Linking:

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