fitdistcp
0.2.3Distribution Fitting with Calibrating Priors for Commonly Used Distributions
Overview
Generates predictive distributions based on calibrating priors for various commonly used statistical models, including models with predictors. Routines for densities, probabilities, quantiles, random deviates and the parameter posterior are provided. The predictions are generated from the Bayesian prediction integral, with priors chosen to give good reliability (also known as calibration). For homogeneous models, the prior is set to the right Haar prior, giving predictions which are exactly reliable. As a result, in repeated testing, the frequencies of out-of-sample outcomes and the probabilities from the predictions agree. For other models, the prior is chosen to give good reliability. Where possible, the Bayesian prediction integral is solved exactly. Where exact solutions are not possible, the Bayesian prediction integral is solved using the Datta-Mukerjee-Ghosh-Sweeting (DMGS) asymptotic expansion. Optionally, the prediction integral can also be solved using posterior samples generated using Paul Northrop's ratio of uniforms sampling package ('rust'). Results are also generated based on maximum likelihood, for comparison purposes. Various model selection diagnostics and testing routines are included. Based on "Reducing reliability bias in assessments of extreme weather risk using calibrating priors", Jewson, S., Sweeting, T. and Jewson, L. (2024); doi:10.5194/ascmo-11-1-2025.
Install
Health
- OK2026-06-0913 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0712 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 91%
- Documented parameters
- not tracked
- Return-value docs
- not tracked
- References docs
- 4%
Downloads
Repository
Stars over time
Repository practices
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/stephenjewson/fitdistcp on 2026-07-19.
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 1.0 median / 55 max
Test coverage
Line coverage
–
Expression
–
Tests / Examples
–
Functions
1168 0 exported
Complexity
2.6 avg / 55 max
Call network
1168 nodes / 1781 edges
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Datasets
People & History
2 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 0.2.3Latest
- 0.1.12025-04-23
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-04-23
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 29 KB / 61 files
- Download size
- 479 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet