vech {fastmatrix}R Documentation

Vectorization the lower triangular part of a square matrix

Description

This function returns a vector obtained by stacking the lower triangular part of a square matrix.

Usage

vech(x)

Arguments

x

a square matrix.

Value

Let X\bold{X} be a nn by nn matrix, then vech(X\bold{X}) is a n(n+1)/2n(n+1)/2-dimensional vector.

Examples

x <- matrix(rep(1:10, each = 10), ncol = 10)
x
y <- vech(x)
y

[Package fastmatrix version 0.5-772 Index]