Learn R Programming

ADtools (version 0.5.4)

elimination_matrix: Elimination matrix

Description

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

Usage

elimination_matrix(n)

Arguments

n

integer, row or column dimension.

Examples

Run this code
# 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