vech2full {OpenMx} R Documentation

## Inverse Half-vectorization

### Description

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

### Usage

```vech2full(x)
```

### Arguments

 `x` an input single column or single row matrix.

### Details

The half-vectorization of an input matrix consists of the elements in the lower triangle of the matrix, including 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 half-vectorization takes a vector and reconstructs a symmetric matrix such that `vech2full(vech(x))` is identical to `x` 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.

`vechs2full`, `vech`, `vechs`, `rvectorize`, `cvectorize`

### Examples

```
vech2full(1:10)

matrix(1:16, 4, 4)
vech(matrix(1:16, 4, 4))
vech2full(vech(matrix(1:16, 4, 4)))

```

[Package OpenMx version 2.6.8 Index]