Learn R Programming

RMThreshold (version 1.1)

rm.spacing.distribution: Plot the empirical distribution of the eigenvalue spacings

Description

A histogram of the empirical distribution of the eigenvalue spacings is plotted. Optionally, curves illustrating the Wigner surmise and/or the Exponential distribution are added.

Usage

rm.spacing.distribution(ev.spacing, nr.breaks = 51, wigner = TRUE, expo = TRUE, title = "Eigenvalue spacing distribution (NNSD)", threshold = NA, dist.Wigner = NA, dist.Expon = NA, pop.up = TRUE, fn = NULL)

Arguments

ev.spacing
A numeric vector containing the spacings of the eigenvalues.
nr.breaks
Number of bins used in the histogram.
wigner
A logical variable that determines if the Wigner-Dyson distribution (Wigner surmise) is to be added to a plot.
expo
A logical variable that determines if the Exponential distribution is to be added to the plot.
title
String containing the title of the plot.
threshold
If not NA, this value will be displayed in the plot, labeled 'threshold'.
dist.Wigner
If not NA, this value will be added to the plot, with a text indicating that it is the numerical value of the Kullback-Leibler distance between the empirical eigenvalue spacing distribution function and the Wigner-Dyson distribution function.
dist.Expon
If not NA, this value will be added to the plot, with a text indicating that it is the numerical value of the Kullback-Leibler distance between the empirical eigenvalue spacing distribution function and the Exponential distribution.
pop.up
A logical variable that determines if the plot is shown in a plot window.
fn
A string determining the filename for storage. Must have extension 'png' or 'pdf'.

Value

See Also

Plotting the eigenvalue distribution: rm.ev.density

Examples

Run this code
## Plot histogram of the spacings of the unfolded eigenvalues of a random matrix:
set.seed(777)
random.matrix <- create.rand.mat(size = 1000, distrib = "norm")$rand.matr
res <- rm.ev.unfold(random.matrix)					  
rm.spacing.distribution(res$ev.spacing) 

Run the code above in your browser using DataLab