powered by
vech takes the upper diagonal from a symmetric matrix and vectorizes it.
vech(x)
A vector with the components of the upper diagonal from the matrix, listed by row.
a symmetric matrix.
Clecio Ferreira, Diego Gallardo and Camila Zeller.
A<-matrix(c(1,2,2,5),nrow=2) ##vectorized A matrix B<-vech(A) B ##reconstitute matrix A using B xpnd(B,2)
Run the code above in your browser using DataLab