## Generate a random correlation matrix
d <- 50
L <- diag(1:d)
set.seed(271)
L[lower.tri(L)] <- runif(choose(d,2))
Sigma <- L <!-- %*% t(L) # ... real, symmetric, positive definite (covariance) matrix Sigma -->
P <- cor(Sigma)
## Density of its lower triangular entries
density_plot_matrix(P)
Run the code above in your browser using DataLab