NEWS
AdMit 2.1.12 (2026-08-21)
- The probability optimization is no longer sensitive to the scale of the
log-kernel. 'fnlnf_C' forms exp(2 * lnw) directly, which overflows above
about +350 and underflows below about -350, so 'AdMit' aborted with
"NA/NaN gradient evaluation" for any target whose log-kernel lies outside
that band, that is, for essentially any posterior with more than a handful
of observations. The objective is invariant to a constant shift of the
log-kernel, so it is now centred before the native call; the softmax
mapping the free parameters to probabilities is max-shifted for the same
reason. NOTE: the mode search in 'fn.optmu' still uses optim()'s relative
'reltol', so a heavily offset log-kernel converges to a slightly looser
mode. Centring the kernel remains good practice.
- 'KERNEL' results are validated before use. A kernel that is not vectorized
used to be recycled silently to the required length, and one returning a
zero-length result left the native Metropolis-Hastings routine reading
past the end of the vector. NA and NaN results are rejected; -Inf, a
legitimate zero density, is not.
- The value returned by 'G' in 'AdMitIS' is validated: wrong length, wrong
type and NA/NaN now give an informative error instead of a cryptic one
from the matrix algebra.
- 'dMit' and 'rMit' no longer describe different mixtures when the
probabilities do not sum to one: 'dMit' used them as given while 'rMit'
normalised them through 'sample'. They are now normalised once, with a
warning; a mixture that already sums to one is left untouched.
- Mixture components with a non-finite, non-symmetric or non-positive
definite scale matrix are rejected instead of producing infinite densities
and degenerate draws.
- The acceptance rate reported by 'AdMitMH' is now the number of accepted
proposals divided by N-1. The chain makes N-1 proposals, the first draw
being its initial state, so a candidate equal to the target reported
(N-1)/N instead of one.
- 'fn.CV' returns zero for a constant weight vector instead of stopping. A
candidate that reproduces the target exactly is the ideal case, not an
error, and the adaptive loop now stops there rather than dividing by it.
- 'fnKernelMixtureArch_C', the kernel of the package demo, combines its two
log-densities around the larger of the two. Forming the exponentials first
returned -Inf for large observations or small conditional variances.
- 'N' is rejected above .Machine$integer.max, where the coercion in '.C'
would have produced NA. 'AdMitIS' requires N >= 2, as its NSE and RNE are
not defined for a single draw. 'mu0' must be finite, and 'ISscale' must be
strictly positive, as the documentation already stated.
- Documentation: the degrees-of-freedom domain of 'mit$df' is stated as a
positive real number, matching the implementation; the acceptance rate and
the RNE = NA convention are documented.
- Declared 'testthat (>= 3.1.5)', the version that introduced
'expect_no_warning' and 'expect_no_error', which the test suite uses.
This release does change results, unlike 2.1.10 and 2.1.11. The acceptance
rate of 'AdMitMH' is larger by a factor N/(N-1) by design. Centring the
log-kernel perturbs the fitted mixture at the level of 1e-8 relative, and
the draws and estimates that follow from it accordingly. Nothing else moved:
the demo reproduces its mode, coefficient of variation path and posterior
mean unchanged.
AdMit 2.1.11
- 'fn.optp' returned H+1 probabilities when both optimizers failed to
converge: the fall-back fed the probability vector back through the logit
transform. AdMit() then aborted with "incorrect number of probabilities",
reachable through the documented control component 'maxit.p'.
- 'dMit(log = TRUE)' returned -Inf far in the tails, where every component
underflows on the ordinary scale although the component log-densities are
still finite. Those entries are now recomputed on the log scale; every
representable value keeps exactly the result it had before.
- 'AdMitMH' failed with "invalid 'length' argument" when 'mit' was omitted,
although the default 'mit = list()' is part of its usage: the default
mixture was substituted inside 'rMit' but the original empty list was read
afterwards.
- 'AdMitIS' discarded a '...' argument destined for the '...' of 'KERNEL' or
of 'G', silently changing the estimate. Such a callee now receives every
named argument.
- 'AdMitIS' returned RNE = NaN for a function of interest with zero
variance; it returns NA instead.
- 'N', 'Ns', 'Np' and 'Hmax' are checked to be single finite whole numbers.
A fractional 'N' used to be truncated silently and produced a recycled
matrix of draws. 'Sigma0' is checked to be square and to conform to 'mu0',
and the components of 'mit' are checked to be conformable.
- Documentation: the plain-text version of the Gelman-Meng kernel was
missing the minus sign in the exponent; the reference to the file
'AdMitJSS.R', not part of the package, now points to the demo; the default
mixture is a univariate standard Cauchy whatever the dimension, not the
d-dimensional distribution that was described.
The fitted mixture returned by 'AdMit', its summary, and the output of
'AdMitIS', 'AdMitMH', 'rMit' and 'dMit' are unchanged for every input that
worked before.
AdMit 2.1.10
- Fixed a C stack overflow in 'fnlnf_C': the scratch buffers used when
optimizing the mixture probabilities were allocated on the stack and
scaled with 'Np', so AdMit(control = list(Ns = 1e5, Np = 1e5)) crashed
the R session. They now come from R's transient heap. Numerical results
are unchanged.
- 'fnKernelMixtureArch_C', used by the package demo, is now registered as a
native routine; it was unreachable since dynamic symbol lookup was
disabled.
- 'AdMitIS' no longer fails when the function of interest is scalar-valued.
This affected univariate targets and any 'G' returning a vector.
- 'rMit' now returns an Nxk matrix for a multivariate mixture when N = 1,
instead of collapsing to a vector.
- Package demo updated: the DEM/GBP data are read from 'fGarch' ('fEcofin'
was archived from CRAN in 2012), and the defunct '.C' arguments 'name'
and 'DUP' were removed.
- Added a 'testthat' test suite.
- Package metadata brought up to current CRAN standards: 'mvtnorm' moved
from 'Depends' to 'Imports' (it is only used internally, through
'mvtnorm::'), redundant 'Maintainer' and stale 'RoxygenNote' fields
removed, 'Encoding' declared, inst/CITATION rewritten with 'bibentry'
('citEntry' and 'personList' are deprecated), and .Rbuildignore
corrected.
- src/packagename_init.c renamed to src/AdMit_init.c.
- Removed the references to the package vignette, which is no longer part
of the package.
- Documented that the function of interest 'G' of 'AdMitIS' may be
scalar-valued, and added examples for a scalar- and a matrix-valued 'G'.
- 'fn.optp' now caches the objective and the gradient on the value of the
parameter instead of relying on the optimizer evaluating them in a fixed
order, and transposes the kernel and density matrices once instead of at
every function evaluation (about 20% faster for large 'Np').
- 'AdMitIS' dispatches the '...' arguments by the name supplied by the user
rather than by the matched formal, so an abbreviated argument name now
reaches 'KERNEL' or 'G' instead of being turned into a missing value, and
an argument used by neither now raises a warning instead of being dropped
silently.
- 'AdMit' warns about unknown components of 'control' (as 'optim' does), and
reports an informative error when no scaling factor yields a usable
coefficient of variation.
- No stack-allocated runtime-sized array is left in the C sources.
- Removed the unused internal function 'fn.wRes'.
The fitted mixture ('mit' and 'CV') returned by 'AdMit', and the output of
'AdMitIS' and 'AdMitMH', are unchanged by the above. The gradient fix in
'fn.optp' does change the reported 'summary': a candidate for which 'nlminb'
used to be misled by a stale gradient, and therefore fell back to 'BFGS',
now converges and is reported as 'NLMINB'. Candidate coefficients of
variation can differ in the last digits accordingly.
AdMit 2.1.9 (2022-02-07)
- 'given' argument in inst/CITATION removed
AdMit 2.1.8 (2021-05-16)
AdMit 2.1.7
AdMit 2.1.5 (2020-04-20)
- package_native_routine_registration_skeleton fixed
- url fixed
- fix doc
AdMit 2.1.4 (2020-04-19)
AdMit 2.1.3 (2017-02-04)
AdMit 2.1.2 (2017-01-18)
AdMit 2.1.1 (2017-01-13)
- Info added in DESCRIPTION
AdMit 2.1.0
- Preparation for new release on CRAN
AdMit 2.0.3
AdMit 2.0.2
- DESCRIPTION file adapted to new standard
- Vignette modified
AdMit 2.0.1 (2014-01-07)
- Compilation for new version on CRAN
- New email address
- Package's structure modified
- Vignette's PDF compressed
- Speedup of examples
- New version number format
AdMit 1-01.06 (2012-09-08)
- Speedup of computations for the examples
AdMit 1-01.05
- The argument names of .C etc were changed in 2.13.0 to start with .NAME (to avoid confusion with names= in ...)
for back-compatibility unnamed first argument
AdMit 1-01.04 (2012-08-21)
- dMit and rMit modified to account of several degrees of freedom; this
allows MitISEM to use these functions
AdMit 1-01.03 (2009-08-20)
- documentation file modified
- CITATION file modified
AdMit 1-01.02 (2009-05-11)
AdMit 1-01.01 (2009-01-06)
- change in AdMit.R to deal with convergence problems for simple cases.
- documentation and codes modified according to JSS style.
- creation of /doc folder with AdMitJSS.txt and AdMitRnews.txt files.
- package vignette added (in /doc).
- CITATION file simplified.
- JSS paper accepted for publication.
- Rnews paper accepted for publication.
AdMit 1-00.04 (2008-11-30)
- file AdMitJSS.txt containing the code of the JSS paper is part of the package.
- documentation of AdMit enhanced (explanations for KERNEL construction).
- add reference for Gelman-Meng.
- modify references in CITATION.
- new 'demo' code.
- 'coda' package is now Suggests.
AdMit 1-00.03
- change the version in the function 'onLoad'.
AdMit 1-00.02 (2008-06-10)
AdMit 1-00.01
- previous versions were 'under construction' versions.