qrmtools (version 0.0-12)

matrix_density_plota: 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

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

Arguments

x

matrix-like object.

xlab

x-axis label.

main

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

matrix_density_plot() 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
# NOT RUN {
## Generate a random correlation matrix
d <- 50
L <- diag(1:d)
set.seed(271)
L[lower.tri(L)] <- runif(choose(d,2))
Sigma <- L 
# }
# NOT RUN {
<!-- %*% t(L) # ... real, symmetric, positive definite (covariance) matrix Sigma -->
# }
# NOT RUN {
P <- cor(Sigma)
## Density of its lower triangular entries
matrix_density_plot(P)
# }

Run the code above in your browser using DataCamp Workspace