powered by
Suppose A is a (n x n) symmetric matrix, then a (n(n-1)/2 x n^2) matrix E is an elimination matrix if E
elimination_matrix(n)
integer, row or column dimension.
# NOT RUN { A <- crossprod(randn(3, 3)) E <- elimination_matrix(3) compare <- function(x, y) { cbind(x, y, err = abs(x - y)) } compare(E %*% vec(A), vech(A)) # }
Run the code above in your browser using DataLab