Learn R Programming

skewMLRM (version 1.6)

xpnd: Reconstitute a symmetric matrix from a vector.

Description

xpnd reconstitutes a symmetric matrix from a vector obtained with the vech function.

Usage

xpnd(x, nrow = NULL)

Value

A symmetric matrix.

Arguments

x

vector with the components of the upper diagonal of the matrix

nrow

dimension of the matrix to be reconstitute.

Author

Clecio Ferreira, Diego Gallardo and Camila Zeller.

Examples

Run this code
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