Changelog
Source:NEWS.md
rxode2ll 2.0.18
CRAN release: 2026-09-15
- ‘rxode2ll’ no longer links or loads the TBB library. ‘stan’‘s TBB tape observer is kept out of the build, since every gradient already creates its own thread’s autodiff tape, so ’RcppParallel’ is needed only for its headers. Loading TBB is what CRAN’s gcc-UBSAN check reports for packages that load ‘rxode2ll’. Log-likelihoods and their gradients are unchanged.
rxode2ll 2.0.17
CRAN release: 2026-09-09
llikNbinom()andllikNbinomMu()now accept a continuous (non-integer)size. In the negative binomial’s mean/dispersion parameterisationsizeis a real dispersion parameter, not a count, andstats::dnbinom()has always allowed it. Previouslysizewas stored in an integer vector and silently truncated, so asizeabove 1 returned the log-likelihood attrunc(size)and asizebetween 0 and 1 truncated to 0 and aborted; the R-levelassertIntegerish(size)rejected such values outright. Truncation also made the log-likelihood a step function ofsize, so the dispersion could not be estimated even when its true value was an integer. This blockednbinomMu()models with continuous overdispersion innlmixr2.sizemust now be strictly positive; non-positive values returnNA. TheINT_MAXbound added in 2.0.15 still applies toxeverywhere, and tosizeforrxLlikBinomwheresizeis a number of trials.llikNbinom()andllikNbinomMu()now returnNAinstead of aborting the R process when the mean handed to the underlying likelihood is out of domain. This covers aprobof 0 (and, through the C API, aproboutside[0, 1]or a negativemu), and – becausesizeis no longer bounded byINT_MAX– a largesizewith a smallprobwhose product overflows. Previously these threw a C++ exception that escaped therxLlikNbinom()/rxLlikNbinomMu()entry points used byrxode2solves andfocei, killing the session.llikNbinom()atprob == 1andllikNbinomMu()atmu == 0now matchstats::dnbinom(). The distribution is degenerate at zero there, sofxis0(a likelihood of 1) atx == 0and-Infotherwise. These are the only points wherestats::dnbinom()defines a value that the underlying Stan likelihood cannot compute – it requires a strictly positive mean. No derivative exists at a point mass, sodProb/dMuareNA; an unusable gradient beats aNAlog-likelihood, and beats the abort these used to cause.prob == 0remainsNA, matching theNaNR returns there.Added more liklihood families and also added a ABI free header for linking
rxode2ll 2.0.16
CRAN release: 2026-07-24
- Fix ABI issues in rxode2 and the nlmixr2 ecosystem by requiring RcppParallel 6.0.0
rxode2ll 2.0.15
CRAN release: 2026-07-17
- Fix signed integer overflow: loop indices in
llikXxxInternal()Rcpp functions changed frominttoR_xlen_t; previously vectors longer than ~500 million elements (>4 GB) could cause undefined behavior due tointoverflow when assigned fromx.size(). - Fix undefined behavior from unchecked
double-to-intcasts for discrete distribution count arguments (x,size) exceedingINT_MAX(2147483647); the five affected C-API functions (rxLlikPois,rxLlikBinom,rxLlikGeom,rxLlikNbinom,rxLlikNbinomMu) now returnNAinstead of invoking undefined behavior for out-of-range inputs. - Fix type correctness for loop indices in Stan autodiff functor
operator()methods across all 15 distributions: changed frominttoEigen::Indexto match the return type ofEigen::VectorXd::size(). - Add comprehensive derivative validation tests using central finite differences for all 14 differentiable distributions.
- Add integer overflow bounds-checking tests for all 5 discrete distributions, calling the
*Internal()C++ functions directly to bypass R-level input validation. - Add a
skip()-guarded large-vector test that documents theR_xlen_tfix and can be run manually on systems with >4 GB free RAM. - Changed _log() to _lpmf()/_lpdf() because these functions changed in StanHeaders
rxode2ll 2.0.11
CRAN release: 2023-03-17
- Update compile flags based on CRAN C++17 requirement (Issue #5)
rxode2ll 2.0.9
CRAN release: 2022-09-29
- Initial release, exports log-likelihood functions from ‘stan’ and their derivatives to R and C. This allows linkage in ‘rxode2’ to allow generalized log-likelihood in ‘nlmixr2’.
- This is a data like package and is likely not to change very much over time.
- Added a
NEWS.mdfile to track changes to the package.