diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-06-11 14:33:01 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-06-11 17:03:42 +0200 |
commit | 5c6e70346efc6a581a4acbec16d0b228d1bddb82 (patch) | |
tree | 93f2d8210976d33d8d40265af6fc9115cbceaee1 | |
parent | 8c9474ad6dde0d0116f2d086776ce62880e9ae68 (diff) |
gnu: Add r-tmvnsim.
* gnu/packages/statistics.scm (r-tmvnsim): New variable.
-rw-r--r-- | gnu/packages/statistics.scm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 30a0d44392..2a878a44e2 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -5289,6 +5289,35 @@ computations taking place in C++ code, and support for interrupting those comput 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") |