Skip to content

mditools

0.1.1Package record

Microdata Infrastructure Tools for Firm-Level Microdata Research

0packages depend
660downloads / year
74.7%test coverage
13/13flavors OK

Overview

About
Maintained by Johanna WeissCRAN page ↗GitHub ↗Issues ↗Declared funder: European Union

Supports the full analysis pipeline for researchers working with firm-level microdata. Provides data tools for panel preparation (import, outlier detection, classification harmonization), analytical methods (production function estimation, capital stock measurement, markups, intensity measures, distributions, regression, clustering), and disclosure tools for tagging outputs with dominance and observation counts before aggregation and publication. Production function estimation implements methods by Ackerberg, Caves and Frazer (2015) doi:10.3982/ECTA13408, Levinsohn and Petrin (2003) doi:10.1111/1467-937X.00246, Wooldridge (2009) doi:10.1016/j.econlet.2009.04.026, Petrin, Poi and Levinsohn (2004) doi:10.1177/1536867X0400400202, and Arellano and Bond (1991) doi:10.2307/2297968 with the "too many instruments" correction by Roodman (2009) doi:10.1111/j.1468-0084.2008.00542.x. Markup estimation follows De Loecker and Warzynski (2012) doi:10.1257/aer.102.6.2437. Cost-share production function estimation follows Basu and Fernald (1997) doi:10.1086/262073. Capital stock estimation via the Perpetual Inventory Method follows OECD (2009) doi:10.1787/9789264068476-en.

Changes in 0.1.1

Bug fixes

  • mdi_aggregate() no longer copies its input when it only summarises it (mrg = FALSE), and reads column types in place instead of copying the columns. Its peak memory on a large table drops from about 2.3 to 0.6 times the table's size.
  • mdi_hier_apply() orders hierarchy levels by their number, so h_10 comes after h_2 (they were ordered alphabetically).
  • mdi_clustering() with method = "pam" works again: it stopped with "length(labels) must equal nrow(Xmat)" whenever it was used.
  • mdi_clustering() with method = "mclust" works without mclust being attached (it stopped with "could not find function mclustBIC").
  • mdi_clustering() no longer changes the caller's random numbers: the seed it sets for reproducible clusters is undone when it returns. Clustering results are unchanged.
Show all changes in 0.1.1Hide the rest of the changes in 0.1.1
  • mdi_regress() computes confidence intervals with the requested covariance estimator (vcov), matching the standard errors.
  • mdi_make_conc() is rewritten: codes linked across years form one harmonized group (connected components), which removes the many-to-many join that stopped on large concordances. Each group is named after its smallest code in its latest year, with a D suffix when that year is before the last one. Group membership is unchanged; some group names differ from 0.1.0. year_list now defaults to the concordance's full year range, and a year without concordance rows is an error.

New features

  • mdi_import_data() reads tables from an Oracle database (format = "oracle"), through RODBC with the password asked interactively (askpass); both packages are suggested, not required.
  • mdi_aggregate() and mdi_jointdist() take domVar and domNr for the dominance check, and mdi_jointdist() takes minNumObs.
  • mdi_outlier() accepts several grouping variables in group.
  • check_dt(), check_string(), check_choice(), check_char_vec() and hier_levels() are exported, for packages that build on mditools.

Documentation

  • Help pages use Markdown; panel_lag() and panel_lag_L() are documented.
  • Acknowledgements and the EU funding statement (Technical Support Instrument, project ProdTool) in the README and on the package help page; the European Union is listed as funder.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.8 min · r-release-macos-x86_64
Status changes
  • OK13 OKNow
  • OK6 OK2026-08-21
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 252 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.1Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
25 (3 internal)includes a package overview page
Examples that run
64%14 run in a plain check · 8 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
96%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
4%

Downloads

660
CRAN downloads in the past year
Rank #19,627 · ~2/day · ~55/mo
Daily download trend is not available in this view yet.
32530 days
66090 days
6601 year
Compare downloads with other packages →
Also on14 r2u3 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-10-08
Responsiveness
not measured
PracticesBeta

4 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/secretariat-compnet/mditools on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing mditools adds 41 packages (22 with compiled code, 35 MB of source tarballs). Heaviest: data.table 5.7 MB, fixest 4.8 MB, dbscan 3.8 MB.

Depends (0)
none
Imports (12)
data.tablefixesthavenreadxlMatrixclusterdbscanmcluststatsutilsgraphicsgrDevices
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (13)
Author, Maintainer since 0.1.0 (2026)
Contributor
Contributor
Contributor
Funder · added in 0.1.1
Technical Support Instrument (TSI), project ProdTool, TSI-2025-MULTIMSPROD-IBA, TSI Project Number 101261159
Releases (2)

Pick two releases to compare their code metrics.

  • 0.1.1Latest
    record
    2026-10-08 · current release · diff ↗ ·
    added 5 exports
    check_char_vec, check_choice, check_dt, check_string, hier_levels
  • 0.1.0
    record
    2026-08-20
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-08-20
Total releases
2 / 1 yrs
License
GPL-3 OSI
Download size
87 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("mditools")
Weiss, J., European Union, Aglio, D., Bartelsman, E., Díaz-Acosta, J., Ferreira, A., Hälbig, M., Miorandi, M., Miranda, J., Ribeiro, M. P., Vishwanath, R., Yi, C., & Zona Mattioli, A. (2026). mditools: Microdata Infrastructure Tools for Firm-Level Microdata Research (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.mditools

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for mditools version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy