vechs2full {OpenMx}R Documentation

Inverse Strict Half-vectorization

Description

This function returns the symmetric matrix constructed from a strict half-vectorization.

Usage

vechs2full(x)

Arguments

x

an input single column or single row matrix.

Details

The strict half-vectorization of an input matrix consists of the elements in the lower triangle of the matrix, excluding the elements along the diagonal of the matrix, as a column vector. The column vector is created by traversing the matrix in column-major order. The inverse strict half-vectorization takes a vector and reconstructs a symmetric matrix such that vechs2full(vechs(x)) is equal to x with zero along the diagonal if x is symmetric.

Note that very few vectors have the correct number of elements to construct a symmetric matrix. For example, vectors with 1, 3, 6, 10, and 15 elements can be used to make a symmetric matrix, but none of the other numbers between 1 and 15 can. An error is thrown if the number of elements in x cannot be used to make a symmetric matrix.

See Also

vech2full, vech, vechs, rvectorize, cvectorize

Examples


vechs2full(1:10)

matrix(1:16, 4, 4)
vechs(matrix(1:16, 4, 4))
vechs2full(vechs(matrix(1:16, 4, 4)))




[Package OpenMx version 2.6.8 Index]