rm.ev.density: Create a density plot and a histogram of the eigenvalue...

Description Usage Arguments Value Note Author(s) See Also Examples

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

1
2
3
 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

1
2
3
4
5
## 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) 

Example output

  Required distribution of matrix elements: norm 
  The mean of the main diagonal is 0.1006 
  The std. deviation of the main diagonal is 1.394 
  The mean of the upper triangle is 0.0008975 
  The std. deviation of the upper triangle is 1.001 
  The matrix is real and symmetric.

RMThreshold documentation built on May 2, 2019, 8:51 a.m.