Learn R Programming

matrixcalc (version 1.0-6)

L.matrix: Construct L Matrix

Description

This function returns a matrix with n * ( n + 1 ) / 2 rows and N * n columns which for any lower triangular matrix A transforms vec( A ) into vech(A)

Usage

L.matrix(n)

Value

An \(\left[ {\frac{1}{2}n\left( {n + 1} \right)} \right] \times {n^2}\) matrix.

Arguments

n

a positive integer order for the associated matrix A

Author

Frederick Novomestky fnovomes@poly.edu

Details

The formula used to compute the L matrix which is also called the elimination matrix is \({\bf{L}} = \sum\limits_{j = 1}^n {\sum\limits_{i = j}^n {{{\bf{u}}_{i,j}}{{\left( {vec\;{{\bf{E}}_{i,j}}} \right)}^\prime }} } \) \({{{\bf{u}}_{i,j}}}\) are the \(n \times 1\) vectors constructed by the function u.vectors. \({{{\bf{E}}_{i,j}}}\) are the \( n \times n\) matrices constructed by the function E.matrices.

References

Magnus, J. R. and H. Neudecker (1980). The elimination matrix, some lemmas and applications, SIAM Journal on Algebraic Discrete Methods, 1(4), December 1980, 422-449.

Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.

See Also

elimination.matrix, E.matrices, u.vectors,

Examples

Run this code
L <- L.matrix( 4 )
A <- lower.triangle( matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE ) )
vecA <- vec( A )
vechA <- vech( A )
y <- L %*% vecA
print( y )
print( vechA )

Run the code above in your browser using DataLab