elimination_matrix: Elimination matrix

Description Usage Arguments Examples

View source: R/optim_special_matrix.R

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

1

Arguments

n

integer, row or column dimension.

Examples

1
2
3
4
5
6
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))

ADtools documentation built on Nov. 9, 2020, 5:09 p.m.