numeric-utils: Functions for numerical algorithms

numeric-utilsR Documentation

Functions for numerical algorithms

Description

Functions for numerical algorithms

Usage

dspd(M, decomposition = "svd")

## S3 method for class 'basecor'
hessian(func, x, method = "Richardson", method.args = list(), ...)

## S3 method for class 'basepcor'
hessian(func, x, method = "Richardson", method.args = list(), ...)

## S3 method for class 'graphpcor'
hessian(func, x, method = "Richardson", method.args = list(), ...)

Arguments

M

square matrix.

decomposition

character to inform which decomposition is to be applied to the hessian. The options are "eigen", "svd" and "chol". Default is "svd".

func

model object definition for a correlation matrix.

x

for a graphpcor it is the parameter vector, otherwise not used.

method

see numDeriv::hessian()

method.args

see numDeriv::hessian()

...

used to pass ifixed, an integer vector to indicate model parameters as fixed. If not used, all parameters are treated unknown.

Value

dspd returns a list with the decomposition elements, "logDeterminant" (of the original matrix), "sqrt" (its 'square root') and "sqrtInv" (its inverse 'square root'). hessian returns the Hessian

matrix with the Hessian

Functions

  • dspd(): hessian: Evaluate the Hessian of the KLD for a basecor. spd: decompose a positive definite matrix, and compute useful elements out of that.

  • hessian(basecor): Evaluate the Hessian for a basecor.

  • hessian(basepcor): Evaluate the hessian of the KLD for a basepcor.

  • hessian(graphpcor): Evaluate the hessian of the KLD for a graphpcor correlation model around a base model.


graphpcor documentation built on March 23, 2026, 9:07 a.m.