vech: Half-Vectorize

Description Usage Arguments Details Author(s) See Also Examples

View source: R/linearAlgebra-vech.R

Description

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

Usage

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

Arguments

x

Matrix.

names

Logical. Add names.

sep

Character string. Separator for variable names.

Details

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

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Vectorization Functions: diag_of_vech(), vec_mean(), vechnames(), vechsnames(), vechs(), 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
)

vech(A)

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