lowerdiag2mat: Convert a vector of the lower diagonoal of a symmetrical...

Description Usage Arguments

View source: R/lowerdiag2mat.R

Description

Storing just the lower diagonal is an efficient way to store MCMC samples of a matrix (and, in fact, is how matrices are stored by the samplers in fit_mvnorm() and fit_mvnorm_hier()).

Usage

1
2
lowerdiag2mat(vec, col_names = TRUE, corr = FALSE, colorder = NULL,
  hier = FALSE)

Arguments

vec

Vector of lower diagonal values

col_names

(Logical) If TRUE (default), extract row and column names from vector names formatted as "row..column".

corr

(Logical) If TRUE, assume this is a correlation matrix where the diagonal is fixed at 1 and therefore not stored.

colorder

Optional numeric or character vector specifying the desired column order.

hier

(Logical) Whether the vector names also include a group name. Only used if col_names is TRUE.


ashiklom/mvtraits documentation built on Sept. 4, 2019, 7:43 a.m.