Adaptive Mixture of Student-t Distributions
Overview
Provides functions to perform the fitting of an adaptive mixture of Student-t distributions to a target density through its kernel function as described in Ardia et al. (2009) doi:10.18637/jss.v029.i03. The mixture approximation can then be used as the importance density in importance sampling or as the candidate density in the Metropolis-Hastings algorithm to obtain quantities of interest for the target density itself.
- 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.
Show all changes in 2.1.12Hide the rest of the changes in 2.1.12
- 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.
From NEWS in the release
Install
Health
- OK13 OK2026-08-26
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 4
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 100%
Also includes 1 demo script (run with demo())
Downloads
Repository
Stars over time
Forks over time
Releases over time
Commits over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/ardiad/admit on 2026-10-18.
Dependencies
Installing AdMit adds 1 package (1 with compiled code, 1.0 MB of source tarballs). Heaviest: mvtnorm 1.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 2.1.12Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 2.1.92022-02-08 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 2.1.82021-05-16 · diff ↗
- 2.1.62021-04-21 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.1.52020-04-20 · diff ↗
- 2.1.42020-04-19 · diff ↗
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
Show 25 earlier eventsHide 25 earlier events
- 2.1.32017-02-05 · diff ↗
- 2.1.22017-01-18 · diff ↗
- 2.1.12017-01-13 · diff ↗
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 2.0.12014-01-07 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 1-01.062012-09-08 · diff ↗
- 1-01.042012-08-21 · diff ↗
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- 1-01.03.12011-02-18 · diff ↗
- RR 2.12.0 released · 2010-10-15
- RR 2.11.0 released · 2010-04-22
- RR 2.10.0 released · 2009-10-26
- 1-01.032009-08-20 · diff ↗
- 1-01.022009-05-11 · diff ↗
- RR 2.9.0 released · 2009-04-17
- 1-01.012009-01-25 · diff ↗
- 1-00.042008-12-01 · diff ↗
- RR 2.8.0 released · 2008-10-20
- 1-00.022008-06-11
- RR 2.7.0 released · 2008-04-22
Package metadata
- First published
- 2008-06-11
- Total releases
- 18 / 18 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 47 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("AdMit")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v029.i03, 10.32614/rj-2009-003.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
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.