Learn R Programming

BMhyb (version 1.5.2)

PositiveDefiniteOptimizationFn: Distance function for optimization

Description

Distance Function between two matrices for optimization searching of positive definite matrix.

Usage

PositiveDefiniteOptimizationFn(x, original)

Arguments

x

x: a vector that contains elements in the upper triangular part of the adjusted variance covariance matrix.

original

original: a vector that contains elements in the upper triangular part of the original variance covariance matrix.

Value

a numerica value of distance

Details

It returns a distance between the new matrix and the original matrix. If the new matrix contains negative element or is not positive definite, then it will return more penalty for the distance.