Stata 15 help for mf_vech_lower

Title

[M-5] vech_lower() -- Stack matrix columns

Syntax

transmorphic colvector vech_lower(transmorphic matrix T)

Description

vech_lower(T) returns square and typically symmetric matrix T transformed into a column vector; only the lower half of the matrix without the main diagonal is recorded.

Example

: x [symmetric] 1 2 3 +-------------+ 1 | 1 | 2 | 2 4 | 3 | 3 6 9 | +-------------+

: v = vech_lower(x) : v 1 +-----+ 1 | 2 | 2 | 3 | 3 | 6 | +-----+

Conformability

vech_lower(T): T: n x n result: (n*(n-1)/2) x 1

Diagnostics

vech_lower(T) aborts with error if T is not square. vech_lower() records only the lower triangle of T without the main diagonal; it does not require that T be symmetric.

Source code

vech_lower.mata


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index