Skip to content

tmvmixnorm

1.2.0

Sampling from Truncated Multivariate Normal and t Distributions

3packages depend
3.7Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Ting Fung MaFirst published 2018-07-185 releasesCRAN page ↗

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).

Install

Health

CRAN checks
13OK
Slowest check: 55 s · r-devel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
2
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-06-08
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 1 earlier snapshots
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
99%
Return-value docs
67%
References docs
0%

Downloads

3.7K
CRAN downloads in the past year
Rank #7,050 · ~10/day · ~309/mo
Daily download trend is not available in this view yet.
29030 days
1.2K90 days
3.7K1 year
Compare downloads with other packages →
Also on142 r2u19 autocran27 c2d4u

Dependencies

Declared dependencies
0 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.2.0
Imports (2)
statsMASS
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
3direct
0indirect

Code & Tests

People & History

People (3)
Maintainer (1)
Maintainer, Author · added in 1.2.0
Authors (3)
Maintainer, Author · added in 1.2.0
Author
Listed in earlier versions (1)
no longer listed · 1.0.1 to 1.1.1
Package Timeline

5 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.2.0Latest
    2026-05-11 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.1.1
    2020-09-18 · diff ↗
  • 1.1.0
    2020-05-19 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 1.0.2
    2018-07-19 · diff ↗
  • 1.0.1
    2018-07-18
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2018-07-18
Total releases
5 / 8 yrs
License
GPL-2 OSI
Minimum R
≥ 3.2.0
Download size
8.8 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("tmvmixnorm")
Ma, T. F., Ghosh, S. K., & Li, Y. (2026). tmvmixnorm: Sampling from Truncated Multivariate Normal and t Distributions (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.tmvmixnorm

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for tmvmixnorm version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-08-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy