vech2full {configural} | R Documentation |
These functions return the symmetric matrix that produces the given half-vectorization result.
vech2full(x)
vechs2full(x, diagonal = 1)
x |
A vector |
diagonal |
A value or vector of values to enter on the diagonal for |
The input consists of a vector of the elements in the lower triangle
of the resulting matrix (for vech2full
, including the elements along the diagonal
of the matrix, as a column vector), filled column-wise. For vechs2full
,
the diagonal values are filled as 1 by default, alternative values can be
specified using the diag
argument. The inverse half-vectorization takes a
vector and reconstructs a symmetric matrix such that vech2full(vech(x)) is
identical to x if x is symmetric.
A symmetric matrix
Based on functions from the the OpenMx package
vech2full(c(1, 2, 3, 5, 6, 9))
vechs2full(c(2, 3, 6), diagonal = 0)