MyNixOS website logo
Description

Low-Rank Methods for MVN and MVT Probabilities.

Implementation of the classic Genz algorithm and a novel tile-low-rank algorithm for computing relatively high-dimensional multivariate normal (MVN) and Student-t (MVT) probabilities. References used for this package: Foley, James, Andries van Dam, Steven Feiner, and John Hughes. "Computer Graphics: Principle and Practice". Addison-Wesley Publishing Company. Reading, Massachusetts (1987, ISBN:0-201-84840-6 1); Genz, A., "Numerical computation of multivariate normal probabilities," Journal of Computational and Graphical Statistics, 1, 141-149 (1992) <doi:10.1080/10618600.1992.10477010>; Cao, J., Genton, M. G., Keyes, D. E., & Turkiyyah, G. M. "Exploiting Low Rank Covariance Structures for Computing High-Dimensional Normal and Student- t Probabilities," Statistics and Computing, 31.1, 1-16 (2021) <doi:10.1007/s11222-020-09978-y>; Cao, J., Genton, M. G., Keyes, D. E., & Turkiyyah, G. M. "tlrmvnmvt: Computing High-Dimensional Multivariate Normal and Student-t Probabilities with Low-Rank Methods in R," Journal of Statistical Software, 101.4, 1-25 (2022) <doi:10.18637/jss.v101.i04>.

About the package

This package offers functionalities for computing multivariate normal and Student-t probabilities. The meanings of this package:

  1. Faster implementation of the classic Genz algorithm (compared with pmvnorm and pmvt functions)
  2. Able to return the results in the log2 form, which is useful when the true probability is smaller than machine precision
  3. Accepts both a matrix and a geometry for building the covariance matrix
  4. Implement the tile-low-rank method with block reordering, which can compute problems in tens of thousands dimensions
  5. Provide the interface for users to adjust the number of Monte Carlo sample size to make a balance between accuracy and computation time specific to their applications.

Speed improvement

For better performance, the package should be compiled with a proper optimization flag. To achieve this, you can do either of the following in the Makevars file under ~/.R directory:

  1. Set CXX14FLAGS to empty, CXX14FLAGS=, which will leave the configure file to find the optimization option based on the CXX14 compiler your R uses.
  2. Set the CXX14 compiler and flags by yourself, e.g. CXX14 = g++ CXX14FLAGS = -O3

The goal here is to override the default compiler options used by R. The default options are fine, just not the fastest.

On Mac OS

After some installations on Mac OS, two issues may happen:

  1. The binary gfortran compiler is not available
  2. The gfortran library is not available

The explanation can be sought from: https://cran.r-project.org/bin/macosx/tools/

And the solution is:

  1. Choose and install gfortran from the above-mentioned website. For issue 2, this should be sufficient
  2. For issue 1, a soft link should be created: ln -s /usr/local/gfortran/bin/gfortran /usr/local/bin/

On Windows

If you are encountering the issue "C++14 standard requested but CXX14 is not defined", one option is to append the Makevars.win file under the .R directory with:

CXX11FLAGS=-O3 -Wno-unused-variable -Wno-unused-function CXX14FLAGS=-O3 -Wno-unused-variable -Wno-unused-function CXX14 = $(BINPREF)g++ -m$(WIN) -std=c++1y

Thanks to Robert Aue for providing this solution.

Then hopefully the installation works!

Metadata

Version

1.1.2

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows