qrmtools (version 0.0-6)

density_plot_matrix: Density Plot of the Values from a Lower Triangular Matrix

Description

Density plot of all values in the lower triangular part of a matrix.

Usage

density_plot_matrix(x, xlab = "Entries in the lower triangular matrix",
                    main = "", text = NULL, side = 4, line = 1, adj = 0, ...)

Arguments

x

A matrix-like object.

xlab

The x-axis label.

main

The title.

text

See mtext(). The text = "", it is omitted.

side

See mtext().

line

See mtext().

adj

See mtext().

Additional arguments passed to the underlying plot().

Value

invisible().

Details

density_plot_matrix() is typically used for symmetric matrices (like correlation matrices, matrices of pairwise Kendall's tau or tail dependence parameters) to check the distribution of their off-diagonal entries.

Examples

Run this code
## 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