Kom: Commutation matrix.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/hoff_functions.R

Description

Construct the communtation matrix.

Usage

1
Kom(m, n)

Arguments

m

a natural number.

n

another natural number.

Details

This function constructs the commutation matrix K, which maps c(A) to c(t(A)) for an m by n matrix A.

Value

K The m * n by m * n commutation matrix.

Author(s)

Peter Hoff.

References

Magnus, J. R., & Neudecker, H. (1979). The commutation matrix: some properties and applications. The Annals of Statistics, 381-394.

Tracy, D. S., & Dwyer, P. S. (1969). Multivariate maxima and minima with matrix derivatives. Journal of the American Statistical Association, 64(328), 1576-1594.

Examples

1
2
3
m <- 5 ; n <- 4
A <- matrix(stats::rnorm(m * n), m, n)
Kom(5, 4) %*% c(A) - c(t(A))

tensr documentation built on May 29, 2017, 9:44 a.m.