Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mvrandt

Random number generation from multivariate truncated Student distribution


Description

Random number generation from multivariate truncated Student distribution

Usage

mvrandt(l, u, Sig, df, n, mu = NULL)

Arguments

l

lower bound for truncation (infinite values allowed)

u

upper bound for truncation

Sig

covariance matrix

df

degrees of freedom

n

sample size

mu

location parameter

Value

a d by n matrix

Author(s)

Matlab code by Zdravko Botev, R port by Leo Belzile

References

Z. I. Botev and P. L'Ecuyer (2015), Efficient probability estimation and simulation of the truncated multivariate Student-t distribution, Proceedings of the 2015 Winter Simulation Conference, pp. 380-391,

Examples

## Not run: 
d <- 60L; n <- 1e3;
Sig <- 0.9 * matrix(1, d, d) + 0.1 * diag(d);
l <- (1:d)/d * 4; u <- l+2; df <- 10;
X <- mvrandt(l,u,Sig,df,n)
stopifnot(all(X>l))
stopifnot(all(X<u))

## End(Not run)

TruncatedNormal

Truncated Multivariate Normal and Student Distributions

v2.2
GPL-3
Authors
Zdravko Botev [aut] (<https://orcid.org/0000-0001-9054-3452>), Leo Belzile [aut, cre] (<https://orcid.org/0000-0002-9135-014X>)
Initial release
2020-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.