BRET (Beta Random Ensembles Toolbox)


Current version posted: November 25, 2015.

Installation instructions:

All files are in here.
You need the mhg package for the functions here to work.

How to cite:

Plamen Koev and Alan Edelman, The efficient evaluation of the hypergeometric function of a matrix argument, Math. Comp. 75 (2006), 833-846.

Other resources

  • Ioana Dumitriu's MOPs package for computing with Multivariate Orthogonal Polynomials.

Conventions

All functions are named as xEnsembleType.m, where
  • x={r,d,p,q} stands for the {empirical, density, probability distribution, quantile} functions
  • Ensemble = {Laguerre, Jacobi, Wishart, MANOVA}
  • Type = {Eig, SVD, Trace}
So that for example dWishartEig returns the density of a (specified) eigenvalue of the Wishart ensemble.

Function description:

mhg, mhgi, logmhg

Description: Those functions compute the Hypergeometric function of one or two matrix arguments. See here for details.
Comments: Note that these functions take alpha=2/beta as a parameter!

gammam

Syntax: y=gammam(beta,m,a)
Description: Computes the multivariate Gamma function of parameter beta.

rLaguerreSVD

Syntax: rLaguerreSVD(N,beta,a,m)
Description: Returns N realizations of the singular values of an mxm Laguerre matrix of parameter a.
Comments: If you need the eigenvalues, those are the squares of the singular values. This routine returns the same as rWishartSVD(beta,2*a/beta,ones(1,m),N)

rWishartSVD

Syntax: rWishartSVD(beta,n,Sigma,N)
Description: Provides N realizations of the singular values of an mxm beta-Wishart matrix with n degrees of freedom and covariance diag(Sigma). Sigma is assumed to be a vector of length m.
Comments: If you need the eigenvalues, those are the squares of the singular values.

rWishartTrace

Syntax: rWishartTrace(beta,n,Sigma,N)
Description: Provides N realizations of the trace an mxm beta-Wishart matrix with n degrees of freedom and covariance diag(Sigma). Sigma must be a row vector of length m.

rJacobiSVD

Syntax: rJacobiSVD(beta,a,b,m,N)
Description: returns N realizations of the singular values of an m-by-m Jacobi matrix with parameters a and b.
Comments: If you need the eigenvalues, those are the squares of the singular values.

pWishartEig

Syntax: pWishartEig(k,MAX,beta,n,Sigma,x)
Description: Returns the distribution of the kth eigenvalue of a Wishart matrix as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function.

pLaguerreEig

Syntax: pLaguerreEig(k,MAX,beta,a,m,x)
Description: Returns the distribution of the kth eigenvalue of a Laguerre matrix of parameter a as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function. This function reverts directly to pWishartEig, which theoretically returns the same and in practice used a wizard to recognize the identity covariance of Laguerre and call mhgi instead of mhg.

pJacobiEig

Syntax: pJacobiEig(k,MAX,beta,a,b,m,x)
Description: Returns the distribution of the kth eigenvalue of an mxm Jacobi matrix with parameters a,b as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function.

dLaguerreEig

Syntax: dLaguerreEig(k,MAX,beta,a,m,x)
Description: Returns the density of the kth eigenvalue of an mxm Laguerre matrix with parameter a as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function. Uses a faster approach than the straightforward derivative of the distribution (so it’s faster than dWishartEig with Sigma=I even though it’s mathematically equivalent).

dWishartEig

Syntax: dWishartEig(k,MAX,beta,n,Sigma,x)
Description: Returns the density of the kth eigenvalue of a Wishart matrix as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function. Computed as the derivative of the distribution.

dWishartTrace

Syntax: dWishartTrace(MAX,beta,n,Sigma,x)
Description: Returns the density, as a function of (the vector) x, of the trace of an Wishart matrix with n degrees of freedom and covariance Sigma. Sigma is assumed to be a vector. MAX is the truncation limit for the hypergeometric function.

dJacobiEig

Syntax: dJacobiEig(k,MAX,beta,a,b,m,x)
Description: Returns the density of the kth eigenvalue of an mxm Jacobi matrix with parameters a,b as a function of the (vector) x. k can only be 1 (largest) or m (smallest) eigenvalue. MAX is the truncation limit for the hypergeometric function.

Plamen Koev
Department of Mathematics, San Jose State University
”firstname” dot “lastname” at sjsu dot edu