rm.ev.density {RMThreshold} | R Documentation |
Create a density plot and a histogram of the eigenvalue distribution
Description
The function creates a density plot of the empirical distribution of the eigenvalues, combined with a histogram. Optionally, a curve illustrating the Wigner semi-circle can be added. The plot can be saved or shown in a plot window. Marks on the x-axis can be added optionally.
Usage
rm.ev.density(eigenvalues, nr.breaks = 51, min.bw = 0.01, wigner = TRUE,
mark.on.x = NULL, title = "Eigenvalue density distribution",
pop.up = TRUE, fn = NULL)
Arguments
eigenvalues |
A numeric vector containing the eigenvalues. |
nr.breaks |
Number of bins used in the histogram. |
min.bw |
Minimum bandwidth for the calculation of the density curve. If the automatically calculated bandwidth gets too low, it is replaced by this value. That prevents the density curve from being too cliffy. |
wigner |
A logical variable that determines if the Wigner semi-circle is to be added to the plot. |
mark.on.x |
A numeric vector or NULL. If not NULL, marks will be added on the x-axis at the positions given by the vector. |
title |
String containing the title of the plot. |
pop.up |
A logical variable that determines if the plot is to be shown in a plot window. |
fn |
A string determining the filename for storage. Must have extension 'png' or 'pdf'. |
Value
The name of the plot filename chosen, or NULL.
Note
This function plots the density of the eigenvalues. For illustration of their spacings, use rm.spacing.distribution
.
Author(s)
Uwe Menzel uwemenzel@gmail.com
See Also
Plotting the eigenvalue spacing distribution: rm.spacing.distribution
Examples
## 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.ev.density(res$eigenvalues, wigner = TRUE)