vech and other matrix operators
1 2 3
a (symmetric) square matrix.
a numeric vector such that
a positive integer number; default is
a vector in case of
vech, otherwise a matrix.
For a square matrix
vech(A) returns the vector formed
by the lower triangular portion of the matrix, including the diagonal;
usually, this only makes sense for a symmetric matrix of numeric values.
M is a symmetric numeric matrix,
vect2mat(v) performs the inverse operation and
M; this explain the requirement on
For a positive integer
D=duplicationMatrix(n) is a matrix
(n^2, n*(n+1)/2) such that
D %*% vech(M) returns
vec-form of a symmetric matrix
n, that is, the vector which stacks the columns of
for more information, see Section 3.8 of Magnus and Neudecker (1988).
the original Octave code of
duplicationMatrix is by Kurt Hornik.
Magnus, Jan R. and Neudecker, Heinz (1988). Matrix differential calculus with application in statistics and econometrics. Wiley series in probability and statistics.
1 2 3 4 5