Skip to content

tmvmixnorm

Sampling from Truncated Multivariate Normal and t Distributions

v1.2.0 · May 11, 2026 · GPL-2

Description

Efficient sampling of truncated multivariate (scale) mixtures of normals under linear inequality constraints is nontrivial due to the analytically intractable normalizing constant. Meanwhile, traditional methods may subject to numerical issues, especially when the dimension is high and dependence is strong. Algorithms proposed by Li and Ghosh (2015) <doi: 10.1080/15598608.2014.996690> are adopted for overcoming difficulties in simulating truncated distributions. Efficient rejection sampling for simulating truncated univariate normal distribution is included in the package, which shows superiority in terms of acceptance rate and numerical stability compared to existing methods and R packages. An efficient function for sampling from truncated multivariate normal distribution subject to convex polytope restriction regions based on Gibbs sampler for conditional truncated univariate distribution is provided. By extending the sampling method, a function for sampling truncated multivariate Student's t distribution is also developed. Moreover, the proposed method and computation remain valid for high dimensional and strong dependence scenarios. Empirical results in Li and Ghosh (2015) <doi: 10.1080/15598608.2014.996690> illustrated the superior performance in terms of various criteria (e.g. mixing and integrated auto-correlation time).

Downloads

CRAN

554

Last 30 days

6351st

1.3K

Last 90 days

3.6K

Last year

Trend: +3.2% (30d vs prior 30d)

r2u CRAN

19

Last 30 days

39

Last 90 days

124

Last year

Trend: +11.8% (30d vs prior 30d)

autoCRAN

2

Last 7 days

4

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
NOTE 12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 8, 2026
NOTE r-devel-linux-x86_64-debian-gcc

R code for possible problems

Found the following possibly unsafe calls:
Fatal error: cannot create 'R_TempDir'
OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

LazyData

'LazyData' is specified without a 'data' directory
NOTE r-oldrel-macos-x86_64

LazyData

'LazyData' is specified without a 'data' directory
NOTE r-oldrel-windows-x86_64

LazyData

'LazyData' is specified without a 'data' directory

Reverse Dependencies (3)

suggests

Dependency Network

Dependencies Reverse dependencies MASS clordr condTruncMVN tmvtnsim tmvmixnorm

Version History

6 tracked
updated 1.2.0 ← 1.1.1 diff May 11, 2026
new 1.1.1 Mar 10, 2026
updated 1.1.1 ← 1.1.0 diff Sep 17, 2020
updated 1.1.0 ← 1.0.2 diff May 18, 2020
updated 1.0.2 ← 1.0.1 diff Jul 18, 2018
new 1.0.1 Jul 17, 2018