varbeta: Recovering a Symmetric Matrix from Its Lower Triangular...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/varbeta.R

Description

This function recovers a symmetric matrix from the vector consisting of its lower triangular elements.

Usage

1
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.

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.

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.

Author(s)

Yet Nguyen ynguyen@odu.edu

References

Yet Nguyen, Dan Nettleton, 2019. rmRNAseq: RNA-seq Analysis for Repeated-measures Data

Examples

1
2
3
4
set.seed(1)
lower.tri.vector <- runif(10)
varout <- rmRNAseq:::varbeta(lower.tri.vector, diag=TRUE)
varout

rmRNAseq documentation built on Nov. 8, 2019, 5:06 p.m.