Stata 15 help for mf_Lmatrix

[M-5] Lmatrix() -- Elimination matrix

Syntax

real matrix Lmatrix(real scalar n)

Description

Lmatrix(n) returns the n(n+1)/2 x n^2 elimination matrix L for which L*vec(X) = vech(X), where X is an n x n symmetric matrix.

Remarks

Elimination matrices are frequently used in computing derivatives of functions of symmetric matrices. Section 9.6 of L├╝tkepohl (1996) lists many useful properties of elimination matrices.

Conformability

Lmatrix(n): n: 1 x 1 result: n(n+1)/2 x n^2

Diagnostics

Lmatrix(n) aborts with error if n is less than 0 or is missing. n is interpreted as trunc(n).

Source code

lmatrix.mata

Reference

L├╝tkepohl, H. 1996. Handbook of Matrices. New York: Wiley.


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