vechs: Strict Half-Vectorize

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/linearAlgebra-vechs.R

Description

Apply a strict half-vectorization, that is, eliminate the diagonal and upper diagonal elements of a k \times k matrix.

Usage

1
vechs(x, names = FALSE, sep = ".")

Arguments

x

Matrix.

names

Logical. Add names.

sep

Character string. Separator for variable names.

Details

The strict half-vectorization of a k \times k matrix \mathbf{A}, given by \mathrm{vechs} ≤ft( \mathbf{A} \right) , is the \frac{1}{2} k ≤ft( k + 1 \right) - k \times 1 vector obtained from the vectorization of \mathbf{A}, given by \mathrm{vec} ≤ft( \mathbf{A} \right) , where that all diagonal and upper diagonal elements of \mathbf{A} are eliminated.

Value

A vector.

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Vectorization

Magnus, J. R., & Neudecker, H. (2019). Matrix differential calculus with applications in statistics and econometrics. Wiley. https://doi.org/10.1002/9781119541219

See Also

Other Vectorization Functions: diag_of_vech(), vec_mean(), vechnames(), vechsnames(), vech(), vec()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
A <- matrix(
  data = c(
    1.0, 0.5, 0.4,
    0.5, 1.0, 0.6,
    0.4, 0.6, 1.0
  ),
  nrow = 3
)

vechs(A)

jeksterslab/linearAlgebra documentation built on Dec. 20, 2021, 10:10 p.m.