vech {BGmisc} | R Documentation |
vech Create the half-vectorization of a matrix
Description
vech Create the half-vectorization of a matrix
Usage
vech(x)
Arguments
x |
a matrix, the half-vectorization of which is desired |
Details
This function returns the vectorized form of the lower triangle of a matrix, including the diagonal. The upper triangle is ignored with no checking that the provided matrix is symmetric.
Value
A vector containing the lower triangle of the matrix, including the diagonal.
Examples
vech(matrix(c(1, 0.5, 0.5, 1), nrow = 2, ncol = 2))
[Package BGmisc version 1.3.2 Index]