Stata 15 help for mf_Dmatrix

[M-5] Dmatrix() -- Duplication matrix

Syntax

real matrix Dmatrix(real scalar n)

Description

Dmatrix(n) returns the n^2 x n(n+1)/2 duplication matrix D for which D*vech(X) = vec(X), where X is an arbitrary n x n symmetric matrix.

Remarks

Duplication matrices are frequently used in computing derivatives of functions of symmetric matrices. Section 9.5 of L├╝tkepohl (1996) lists many useful properties of duplication matrices.

Conformability

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

Diagnostics

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

Source code

dmatrix.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