Skip to content

RTMBdist

1.1.0Package record

Distributions Compatible with Automatic Differentiation by 'RTMB'

1packages dependsuggested by 1
5.3Kdownloads / year
63.4%test coverage
13/13flavors OK

Overview

About

Extends the functionality of the 'RTMB' https://kaskr.r-universe.dev/RTMB package by providing a collection of non-standard probability distributions compatible with automatic differentiation (AD). While 'RTMB' enables flexible and efficient modelling, including random effects, its built-in support is limited to standard distributions. The package adds additional AD-compatible distributions, broadening the range of models that can be implemented and estimated using 'RTMB'. Automatic differentiation and Laplace approximation are described in Kristensen et al. (2016) doi:10.18637/jss.v070.i05.

Changes in 1.1.0
  • Added the Johnson SU distribution in both the original parameterisation (djsu(), pjsu(), qjsu(), rjsu()) and the moment parameterisation (djsu2(), pjsu2(), qjsu2(), rjsu2()), a four-parameter distribution on the real line covering a wide range of skewness and kurtosis. In djsu2() the location and scale arguments are exactly the mean and standard deviation. The density and distribution function are both differentiable, so simulation and one-step-ahead residuals are supported. Unlike gamlss.dist, the reparameterisation stays finite for very large tau, where the distribution approaches the normal.
  • Added references to the primary source for each distribution derived from gamlss.dist, and cross-links between related families. pgenpois() and friends previously had no references at all.
  • Removed the dependency on gamlss.dist, which is scheduled for archival on CRAN. The quantile and random generation functions of the Box-Cox Cole-Green (qbccg(), rbccg()), Box-Cox *t* (qbct(), rbct()), Box-Cox power exponential (qbcpe(), rbcpe()), power exponential (qpowerexp(), rpowerexp(), qpowerexp2(), rpowerexp2()), Pareto (qpareto(), rpareto()), generalised Poisson (pgenpois(), qgenpois(), rgenpois()) and exponentially modified Gaussian (qexgauss()) distributions are now implemented natively. Results are unchanged except for the fixes below.
  • Fixed argument recycling in qbccg(), qbct(), qbcpe(), qgenpois() and pgenpois(). Evaluating a single quantile against vectorised parameters previously collapsed the result to length one, and a parameter vector shorter than x silently truncated it. These functions now return one value per recycled argument tuple.
  • Fixed qbct() and rbct(), which failed with an error when mu, sigma or tau was supplied as a vector.
  • qpareto() now honours lower.tail, which was previously accepted but ignored.
  • log.p = TRUE now works in qpareto(), qbct() and qgenpois(). These previously validated p before transforming it back from the log scale, so the argument could not be used.
  • qexgauss() is substantially more accurate. It inverts pexgauss() with a tighter convergence tolerance, reducing the round-trip error |p(q(p)) - p| from roughly 1e-6 to roughly 1e-14.
  • pgenpois() no longer falls back to the Poisson distribution for phi < 1e-4 and evaluates the generalised Poisson distribution function across the whole parameter range.
  • pbetaprime(), pinvchisq() and pinvgamma() are now differentiable, so one-step-ahead residuals via method = "cdf" are available for the beta prime, inverse chi-squared and inverse gamma distributions.
  • Added the Bell distribution (dbell(), pbell(), qbell(), rbell()) and its mean parameterisation (dbell2(), pbell2(), qbell2(), rbell2()), a one-parameter distribution for overdispersed counts. Log Bell numbers are used throughout and cached, so the density stays finite well past the point at which the Bell numbers themselves overflow double precision. One-step-ahead residuals are supported via method = "cdf".
  • Added lambertW(), an AD-compatible implementation of the principal branch of the Lambert W function. Derivatives of all orders are exact, so it can be used in models fitted by Laplace approximation.
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
  • Added the Conway-Maxwell-binomial distribution (dcombinom(), pcombinom(), qcombinom(), rcombinom()), a binomial generalisation with an additional dispersion parameter nu. The density and distribution function are differentiable with respect to x, so one-step-ahead residuals are supported.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-07-23
  • ERROR11 OK, 1 ERROR2026-04-25
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.1.0
READMEYes · 223 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 1.1.0Citation fileNoWebsiteYes · pkgdown
Description cites a JSS article
Help pages
79
Examples that run
100%79 run in a plain check
Exported functions with examples
100%
Documented parameters
66%
Return-value docs
100%
Help pages citing references
16%

Downloads

5.3K
CRAN downloads in the past year
Rank #6,133 · ~15/day · ~442/mo
Daily download trend is not available in this view yet.
44230 days
1.3K90 days
5.3K1 year
Compare downloads with other packages →
Also on177 r2u3 autocran

Repository

4Stars
1Forks
2Open issues
0Open PRs
0Releases
364Commits
2Commit identities
364 commits · Last activity 2026-09-26 · 0% stars, 30d · Default branch at 1.2.0, ahead of CRAN 1.1.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
11
Median days to close, 50 most recently updated closed PRs
49

Issues over time

2026-03-06 · 12026-07-07 · 2
PracticesBeta

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

Checks run against github.com/janolefi/rtmbdist on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-26 · The repository has a site deploy workflow

pkgdown site last built 2026-09-26

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-05-11
    Seen in the repository: .claude
    Named in .Rbuildignore: .claude
    Commits: at least 10 crediting it in the message
Models named in its commits
  • Claude Opus 5.510 commits · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing RTMBdist adds 17 packages (13 with compiled code, 10.0 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppEigen 1.7 MB, mvtnorm 1.0 MB.

Depends (2)
R >= 3.5.0RTMB
Imports (6)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Suggested by 1
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer · added in 1.0.1

Maintainer since 0.1.0 (2025)

Listed in earlier versions (1)
no longer listed · 0.1.0 to 1.0.0
Releases (9)

Pick two releases to compare their code metrics.

  • 1.1.0Latest
    record
    2026-09-06 · current release · diff ↗ ·
    added 17 exports
    dbell, dbell2, djsu, djsu2, lambertW, pbell, pbell2, pjsu, pjsu2, qbell, qbell2, qjsu, qjsu2, rbell, rbell2, rjsu, rjsu2
  • 1.0.6
    record
    2026-08-21 · diff ↗ ·
    added 5 exports
    dcombinom, laplace_check, pcombinom, qcombinom, rcombinom
  • unarchivedReturned to CRAN
    2026-07-22
  • 1.0.5
    record
    2026-07-22 · diff ↗ ·
    removed 1 export
    pnbinom
    added 8 exports
    dgompertz, dllogis, pgompertz, pllogis, qgompertz, qllogis, rgompertz, rllogis
  • archivedRemoved from CRAN
    2026-07-15
    issues were not corrected in time
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.4
    record
    2026-04-09 · diff ↗ ·
    added 2 exports
    mcreport, rgmrf
  • 1.0.3
    record
    2026-04-01 · diff ↗ ·
    added 3 exports
    dziweibull, pziweibull, rziweibull
  • 1.0.2
    record
    2026-03-16 · diff ↗ ·
    added 22 exports
    dbetaprime, dgengamma, dinvchisq, dinvgamma, dkumar, dskellam, pbetaprime, pgengamma, pinvchisq, pinvgamma, pkumar, qbetaprime, qgengamma, qinvchisq, qinvgamma, qkumar, rbetaprime, rgengamma, rinvchisq, rinvgamma, rkumar, rskellam
  • 1.0.1
    record
    2026-02-24 · diff ↗
  • 1.0.0
    record
    2026-01-13 · diff ↗ ·
    added 20 exports
    Cclayton, Cfrank, Cgumbel, abs_smooth, cgmrf, cmvgauss, ddcopula, dmvcopula, dpgweibull, dskewt2, dwishart, hpgweibull, ppgweibull, pskewt2, qpgweibull, qskewt2, rpgweibull, rskewt2, rwishart, spgweibull
  • 0.1.0
    record
    2025-10-07
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-10-07
Total releases
9 / 1 yrs
License
GPL-2 | GPL-3 OSI · relicensed from MIT + file LICENSE in 1.1.0
Minimum R
≥ 3.5.0
Download size
402 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("RTMBdist")
Fischer, J. (2026). RTMBdist: Distributions Compatible with Automatic Differentiation by 'RTMB' (Version 1.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.RTMBdist

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 RTMBdist version 1.1.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, 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