Truncated Multivariate Normal and Student Distributions
Overview
A collection of functions to deal with the truncated univariate and multivariate normal and Student distributions, described in Botev (2017) doi:10.1111/rssb.12162 and Botev and L'Ecuyer (2015) doi:10.1109/WSC.2015.7408180.
Bug fixes
rtnormnow checks arguments length and throw an error rather than try to recycle mean and standard deviation vectors (issue #6).rtnormrecycles arguments whenltruncorrtruncare length 1.*tmvtand*tmvnormnow check that the scale matrixsigmais symmetric, positive-definite and non-degenerate (issue #8) by default.rmvnormreturns a vector rather than an 1 by n matrix for the unidimensional setting.- Degrees of freedom larger than 350 are not treated as infinite, as the code suffers from overflow and returns missing values otherwise.
Changes
- The package uses
tinytestrather thantestthatfor unit tests. - Since scrambling is disabled in
randtoolbox(throwing warning messages), the package now relies on theqrngpackage and the Owen scrambling method fromspacefillrpackage for quasi Monte Carlo. - Added alias in package documentation, as requested by Kurt Hornik.
From NEWS.md in the release
Install
Health
NOTERd contentsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Rd files without \usage: ‘tmvnorm.Rd’ ‘tmvt.Rd’ ‘tnorm.Rd’ \arguments should not be documented without \usage.
- NOTE11 OK, 2 NOTE2026-09-08
- ERROR10 OK, 2 NOTE, 1 ERROR2026-09-07
- NOTE12 OK, 1 NOTE2026-07-11
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 32 (22 internal)includes a package overview page
- Examples that run
- 93%13 run in a plain check · 1 never run
- Exported functions with examples
- 42%
- Documented parameters
- 80%
- Return-value docs
- 62%
- Help pages citing references
- 56%
- TruncatedNormal HTML
Downloads
Repository
- PRs merged (all time)
- 67%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 14
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/lbelzile/truncatednormal on 2026-10-25.
Dependencies
Installing TruncatedNormal adds 7 packages (5 with compiled code, 6.4 MB of source tarballs). Heaviest: spacefillr 3.1 MB, Rcpp 1.8 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
Previously maintained by Zdravko Botev (1.0).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 2.3Latest
- 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.2.22021-09-08 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 2.22020-05-17 · diff ↗
- 2.1.22020-05-02 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.12019-08-31 · diff ↗
- 2.02019-06-10 · diff ↗ ·
removed 1 export
pattern:^[[:alpha:]]+added 26 exports
.cholpermGB, .cholpermGGE, .dmvnorm_arma, .dmvt_arma, Phinv, cholperm, dtmvnorm, dtmvt, lnNpr, mvNcdf, mvNqmc, mvTcdf, mvTqmc, mvrandn, mvrandt, norminvp, pmvnorm, pmvt, ptmvnorm, ptmvt, qtnorm, rtmvnorm, rtmvt, rtnorm, trandn, tregress - 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 3 earlier eventsHide 3 earlier events
- RR 3.3.0 released · 2016-05-03
- 1.02015-11-10
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2015-11-10
- Total releases
- 7 / 11 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 5.9 KB / 2 files
- Download size
- 131 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("TruncatedNormal")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.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.