par2Matrix: Create Gamma or Theta from vector

View source: R/matrix_transformations.R

par2MatrixR Documentation

Create Gamma or Theta from vector

Description

Convert parameter vector par (upper triangular part of Gamma/Theta matrix) to full Gamma/Theta, or vice versa.

Usage

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)

Arguments

par

Numeric vector with d elements. Upper triangular part of a Gamma/Theta matrix.

allowMatrix

If TRUE and par is already a matrix, return it as is.

allowNull

If TRUE and par is NULL, return NULL.

zeroRowSums

If TRUE the diagonal is set to (-1) times the rowSums.

M

Matrix

allowVector

If TRUE and M is already a vector, return it as is.

Value

Numeric matrix \dxd. Full Gamma/Theta matrix corresponding to par.

Upper triangular part of M (or M itself/NULL if allowed)

See Also

Other parameter matrix transformations: Gamma2Sigma(), Gamma2graph(), chi2Gamma()


graphicalExtremes documentation built on Nov. 14, 2023, 1:07 a.m.