Learn R Programming

gogarch (version 0.7-0)

unvech: Returns a symmetric matrix from a vector

Description

This function returns the symmetric matrix $X$ from a vector that resulted from $v = vech(X)$.

Usage

unvech(v)

Arguments

v
Vector, numeric.

Value

  • XMatrix, symmetric of order $m \times m$.

encoding

latin1

concept

  • vech
  • vech invert

Details

The vector v must have length equal to $m * (m + 1) / 2$, whereby $m$ is a dimension of the symmetric matrix $X_{m \times m}$.

See Also

vec

Examples

Run this code
v <- c(1, 2, 3, 4, 5, 6)
unvech(v)

Run the code above in your browser using DataLab