basecor-utils: Functions used by/to basecor

basecor-utilsR Documentation

Functions used by/to basecor

Description

Functions used by/to basecor

Map a correlation matrix to theta.

Usage

cholcor(theta, p, iLtheta, parametrization = "cpc")

corr2theta(corr)

Arguments

theta

numeric parameter vector.

p

integer with the dimension, the number of rows/columns of the correlation matrix.

iLtheta

integer vector to specify the (vectorized) position where 'theta' will be placed in the (lower triangle) Cholesky factorization of the correlation matrix. Default (missing, or if NULL) and assumes iLtheta = which(lower.tri(...)).

parametrization

character to specify the parametrization used. The available ones are "cpc" (or "CPC") or "sap" (or "SAP"). See Details. The default is "cpc".

corr

matrix as a correlation matrix

Value

matrix with lower triangle as the Cholesky factor of a correlation matrix, and atttibutes: parametrization ("cpc" or "sap"), "theta" the parameter vector under the parametrization, "iLtheta" the index in the lower triangle matrix for theta, "logDeterminant" the log determinant for the correlation matrix.

Functions

  • cholcor(): Build the (lower) Cholesky for a correlation matrix

  • corr2theta(): This function takes a correlation matrix and return the parameter vector that generates it with the canonical partial correlation parametrization.


graphpcor documentation built on May 7, 2026, 5:06 p.m.