duplication.matrix {matrixcalc}R Documentation

Duplication matrix for n by n matrices

Description

This function returns a matrix with n * n rows and n * ( n + 1 ) / 2 columns that transforms vech(A) to vec(A) where A is a symmetric n by n matrix.

Usage

duplication.matrix(n=1)

Arguments

n

Row and column dimension

Value

A matrix.

Note

If the argument is less than or equal to zero, the function displays an error message and stops. If the argument is not an integer, the function displays an error message and stops.

Author(s)

Frederick Novomestky fnovomes@poly.edu, Kurt Hornik Kurt.Hornik@wu-wien.ac.at

References

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

See Also

vec, vech

Examples

D <- duplication.matrix( 4 )
A <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE )
vecA <- vec( A )
vechA<- vech( A )
y <- D 
print( y )
print( vecA )

[Package matrixcalc version 1.0-1 Index]