qincol: Convert a symmetric matrix into a vector

Description Usage Arguments Value See Also Examples

Description

Calling qincol() on a symmetric matrix with dimension rxr converts this matrix a vector of length r(r+1)/2. This function is used to handle the MCMC sampling output from multivariate finite mixture models. To save storage the symmetric variance-covariance matrices of multivariate mixtures are stored vector form. If the covariance matrices are needed for calculations the functions qinmatr() and qinmatrmult() helps to restore these matrices from the storage vectors.

Usage

1
qincol(m)

Arguments

m

A symmetric matrix or dimension rxr.

Value

A vector of length r(r+1)/2.

See Also

Examples

1
2
3
4
5
6
# Define a vector.
q <- rnorm(n = 6, mean = 0.5, sd = 2)
# Generate the symmetric matrix.
mat <- qinmatr(q)
# Convert the matrix back into the vector.
qincol(mat)

simonsays1980/finmix documentation built on Dec. 23, 2021, 2:25 a.m.