gnu: Add r-tmvnsim.

* gnu/packages/statistics.scm (r-tmvnsim): New variable.
This commit is contained in:
Ricardo Wurmus 2020-06-11 14:33:01 +02:00
parent 8c9474ad6d
commit 5c6e70346e
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -5289,6 +5289,35 @@ (define-public r-rcppprogress
even in multithreaded code, typically using OpenMP.")
(license license:gpl3+)))
(define-public r-tmvnsim
(package
(name "r-tmvnsim")
(version "1.0-2")
(source
(origin
(method url-fetch)
(uri (cran-uri "tmvnsim" version))
(sha256
(base32
"03xsvsg9bqvgl98ywid3h91mmlhax5s6wvmypp3hq91vmc5kvxlp"))))
(properties `((upstream-name . "tmvnsim")))
(build-system r-build-system)
(native-inputs `(("gfortran" ,gfortran)))
(home-page "https://www.r-project.org")
(synopsis "Truncated multivariate normal simulation")
(description
"This package implements importance sampling from the truncated
multivariate normal using the @dfn{Geweke-Hajivassiliou-Keane} (GHK)
simulator. Unlike Gibbs sampling which can get stuck in one truncation
sub-region depending on initial values, this package allows truncation based
on disjoint regions that are created by truncation of absolute values. The
GHK algorithm uses simple Cholesky transformation followed by recursive
simulation of univariate truncated normals hence there are also no convergence
issues. Importance sample is returned along with sampling weights, based on
which, one can calculate integrals over truncated regions for multivariate
normals.")
(license license:gpl2)))
(define-public r-mnormt
(package
(name "r-mnormt")