trig_mat_to_array: Convert condensed covariance matrix to large array format

View source: R/utils.R

trig_mat_to_arrayR Documentation

Convert condensed covariance matrix to large array format

Description

Shift from the lower triangular matrices k \times \frac{p(p+1)}{2} to large array, of dimension p \times p \times k

Usage

trig_mat_to_array(x, transposed = TRUE, ...)

Arguments

x

a covariance matrix, formatted as \frac{p(p+1)}{2} \times k, each column j \in \{1, \ldots, k \} describing the covariance matrix associated to component j

transposed

if transposed, the input is of dimension k \times \frac{p(p+1)}{2}, each row j describing the covariance matrix associated to component j

...

additional parameters to pass to function vec2sym(), enabling to deal with distinct way to provide covariance information

Value

a large array, of dimension p \times p \times k: one array of covariance matrix, on the third dimension, for each component


bastienchassagnol/RGMMBench documentation built on Oct. 26, 2023, 5:58 p.m.