softcats: Regression on Predicted Categories with Calibrated Probabilities

Estimates the association between an outcome and a latent categorical group from calibrated class probabilities instead of predicted labels. Assigning each observation its most likely category or thresholding the probabilities distorts regression estimates (for a binary group it typically attenuates them) and can give confidence intervals whose coverage is far below the nominal level. The estimator partials the controls out of the outcome and the probabilities with cross-fitted machine learning nuisance functions and solves a Neyman-orthogonal moment equation, with heteroskedasticity- or cluster-robust standard errors and optional weights. Further functions report how much information the probabilities carry beyond the controls, test conditional calibration and direct effects of classifier features on labelled data, recalibrate the probabilities on such data, bound the bias from calibration error, and compare the estimate with hard-label regressions, including the distortion and the implied coverage of the cross-fitted hard-label estimate. Methods follow Kurbucz (2026) <doi:10.48550/arXiv.2608.11784> for several categories and coarsening, Kurbucz (2026) <doi:10.48550/arXiv.2605.12780> for confidence thresholding, and the cross-fitting of Chernozhukov et al. (2018) <doi:10.1111/ectj.12097>.

Version: 1.0.0
Depends: R (≥ 4.1.0)
Imports: generics (≥ 0.1.0), graphics, ranger (≥ 0.12.0), stats
Suggests: broom, glmnet, knitr, lmtest, modelsummary, rmarkdown, splines, testthat (≥ 3.0.0)
Published: 2026-12-04
DOI: 10.32614/CRAN.package.softcats (may not be active yet)
Author: Marcell T. Kurbucz ORCID iD [aut, cre, cph], Economic and Social Research Council [fnd] (Grant UKRI5718)
Maintainer: Marcell T. Kurbucz <m.kurbucz at ucl.ac.uk>
BugReports: https://github.com/mtkurbucz/softcats/issues
License: GPL (≥ 3)
URL: https://github.com/mtkurbucz/softcats, https://mtkurbucz.github.io/softcats/
NeedsCompilation: no
Language: en-GB
Citation: softcats citation info
Materials: README, NEWS
CRAN checks: softcats results

Documentation:

Reference manual: softcats.html , softcats.pdf
Vignettes: Regression on Predicted Categories with softcats (source, R code)

Downloads:

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

Linking:

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