RMAT is an R package for simulating random matrices and ensembles as well as computing and analyzing their eigenvalue spectra and dispersions.
NOTE: This package has been submitted to CRAN and is pending release.
You can install the package in one of two ways:
# Through CRAN
install.packages("RMAT")
# Through Github
::install_github(repo = "ataqi23/RMAT") devtools
The package can be thought to contain two priamry modules: the matrix module and spectral statistics module.
Included in the package are various wrapper functions for generating
random matrices very efficiently. They follow the RM_xxx
format in allusion to the stats
sampling functions like
rnorm
. Every matrix sampling function has an ensemble
counterpart in the RME_xxx
format.
Consider the following example:
library(RMAT)
# Generate an ensemble of 50x50 Complex Hermitian Standard Normal matrices
<- RME_norm(N = 20, cplx = T, herm = T, size = 50) ens
The matrices included are:
The two primary functions in the spectral statistics module are
spectrum
and dispersion
. These two functions
take either a matrix or an ensemble, and return the respective
eigenvalue spectrum or dispersion. Consider the following example:
library(RMAT)
# Generate a random matrix ensemble
<- RME_beta(N = 20, beta = 4, size = 50)
ens # Compute the spectral statistics of the ensemble
<- spectrum(ens, sort_norms = FALSE)
ens_spectrum <- dispersion(ens, pairs = "consecutive", sort_norms = FALSE) ens_dispersion
This package was developed as a part of my Reed senior thesis in the Spring of 2021.