varbeta: Recovering a Symmetric Matrix from Its Lower Triangular Matrix
Description
This function recovers a symmetric matrix from the vector consisting of its
lower triangular elements.
Usage
varbeta(lower.tri.vector, diag = TRUE)
Arguments
lower.tri.vector
a numerical vector containing the lower triangular
elements of the symmetric matrix.
diag
a logical indicator, TRUE or FALSE, indicating if
lower.tri.vector contains diagonal elements of the symmetric matrix or not.
Value
The function varbeta returns the original symmetric matrix. We
only use diag = FALSE to recover the correlation matrix, because
diagonal elements of a correlation matrix are all 1, so there is no reason
to store these diagonal elements in this case.
Details
diag = FALSE is the case where a correlation matrix whose diagonal
elements are 1, therefore there is no need in storing the diagonal elements.
References
Yet Nguyen, Dan Nettleton, 2019. rmRNAseq: RNA-seq Analysis for Repeated-measures Data