Skip to content

fitdistcp

0.2.3

Distribution Fitting with Calibrating Priors for Commonly Used Distributions

0packages depend
2.7Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Stephen JewsonFirst published 2025-04-232 releasesCRAN page ↗GitHub ↗

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

CRAN checks
13OK
Slowest check: 13.1 min · r-oldrel-macos-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
9
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-07
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
91%
Documented parameters
not tracked
Return-value docs
not tracked
References docs
4%

Downloads

2.7K
CRAN downloads in the past year
Rank #17,634 · ~7/day · ~223/mo
Daily download trend is not available in this view yet.
24330 days
66490 days
2.7K1 year
Compare downloads with other packages →
Also on186 r2u30 autocran

Repository

Repository
3Stars
0Forks
0Open issues
0Open PRs
0Releases
59Commits
1Contributors
59 commits · Last activity 2025-11-25 · 0% stars, 30d

Stars over time

2025-05-07 · 12026-07-07 · 3

Repository practices

Upstream repositoryBeta

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.

Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
Rd 43,129 (54%)R 37,242 (46%)
Code characteristics
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

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 59
NameClassRows × ColsAlso ships in
d010exp_example_data_v1vector
d011pareto_k2_example_data_v1vector
d020halfnorm_example_data_v1vector
d025unif_example_data_v1vector
d030norm_example_data_v1vector
d031norm_dmgs_example_data_v1vector
d032gnorm_k3_example_data_v1vector
d035lnorm_example_data_v1vector
d036lnorm_dmgs_example_data_v1vector
d040logis_example_data_v1vector
d041lst_k3_example_data_v1vector
d042cauchy_example_data_v1vector
d050gumbel_example_data_v1vector
d051frechet_k1_example_data_v1vector
d052weibull_example_data_v1vector
d053gev_k3_example_data_v1vector
d055exp_p1_example_data_v1_tvector
d055exp_p1_example_data_v1_xvector
d056pareto_p1k2_example_data_v1_tvector
d056pareto_p1k2_example_data_v1_xvector
d060norm_p1_example_data_v1_tvector
d060norm_p1_example_data_v1_xvector
d061lnorm_p1_example_data_v1_tvector
d061lnorm_p1_example_data_v1_xvector
d062logis_p1_example_data_v1_tvector
d062logis_p1_example_data_v1_xvector
d063lst_p1k3_example_data_v1_tvector
d063lst_p1k3_example_data_v1_xvector
d064cauchy_p1_example_data_v1_tvector
d064cauchy_p1_example_data_v1_xvector
d070gumbel_p1_example_data_v1_tvector
d070gumbel_p1_example_data_v1_xvector
d071frechet_p2k1_example_data_v1_tvector
d071frechet_p2k1_example_data_v1_xvector
d072weibull_p1_example_data_v1_tvector
d072weibull_p1_example_data_v1_xvector
d073weibull_p2_example_data_v1_tvector
d073weibull_p2_example_data_v1_xvector
d074gev_p1k3_example_data_v1_tvector
d074gev_p1k3_example_data_v1_xvector
d080norm_p12_example_data_v1_t1vector
d080norm_p12_example_data_v1_t2vector
d080norm_p12_example_data_v1_xvector
d081lst_p12k3_example_data_v1_t1vector
d081lst_p12k3_example_data_v1_t2vector
d081lst_p12k3_example_data_v1_xvector
d082weibull_p12_example_data_v1_t1vector
d082weibull_p12_example_data_v1_t2vector
d082weibull_p12_example_data_v1_xvector
d100gamma_example_data_v1vector
d101invgamma_example_data_v1vector
d102invgauss_example_data_v1vector
d105burr_example_data_v1vector
d110gev_example_data_v1vector
d120gpd_k1_example_data_v1vector
d150gev_p1_example_data_v1_tvector
d150gev_p1_example_data_v1_xvector
d151gev_p12_example_data_v1_xvector
d152gev_p123_example_data_v1_xvector

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Package Timeline

2 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.3Latest
    2025-11-24 · current release · diff ↗
  • 0.1.1
    2025-04-23
  • R
    R 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
Report a problem with this page →