Convert parameter vector par (upper triangular part of Gamma/Theta matrix)
to full Gamma/Theta, or vice versa.
par2Matrix(par, allowMatrix = FALSE, allowNull = FALSE, zeroRowSums = FALSE)par2Gamma(par, allowMatrix = FALSE, allowNull = FALSE)
par2Theta(par, allowMatrix = FALSE, allowNull = FALSE)
matrix2par(M, allowVector = FALSE, allowNull = FALSE)
Numeric matrix \(d \times d\). Full Gamma/Theta matrix corresponding to par.
Upper triangular part of M (or M itself/NULL if allowed)
Numeric vector with d elements.
Upper triangular part of a Gamma/Theta matrix.
If TRUE and par is already a matrix, return it as is.
If TRUE and par is NULL, return NULL.
If TRUE the diagonal is set to (-1) times the rowSums.
Matrix
If TRUE and M is already a vector, return it as is.
Other parameter matrix transformations:
Gamma2Sigma(),
Gamma2graph(),
chi2Gamma()