The probability density function,
of an
-dimensional multivariate Normal distribution with mean vector
and
by
variance-covariance matrix
, is given by
If the variance-covariance matrix,
, is not of full rank then the probability density function, is calculated as
where
is the pseudo-determinant,
a generalized inverse of
and
its rank.
None.
-
1:
– Nag_Boolean
Input
-
On entry: the value of
ilog determines whether the logarithmic value is returned in PDF.
- , the probability density function is returned.
- , the logarithm of the probability density function is returned.
-
2:
– Integer
Input
-
On entry: , the number of points the PDF is to be evaluated at.
Constraint:
.
-
3:
– Integer
Input
-
On entry: , the number of dimensions.
Constraint:
.
-
4:
– const double
Input
-
Note: the dimension,
dim, of the array
x
must be at least
.
where appears in this document, it refers to the array element
.
On entry: , the matrix of points at which to evaluate the probability density function, with the th dimension for the th point held in .
-
5:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
x.
Constraint:
.
-
6:
– const double
Input
-
On entry: , the mean vector of the multivariate Normal distribution.
-
7:
– Nag_MatrixType
Input
-
On entry: indicates the form of
and how it is stored in
sig.
- sig holds the lower triangular portion of .
- sig holds the upper triangular portion of .
- is a diagonal matrix and sig only holds the diagonal elements.
- sig holds the lower Cholesky decomposition, such that .
- sig holds the upper Cholesky decomposition, such that .
Constraint:
, , , or .
-
8:
– const double
Input
-
Note: the dimension,
dim, of the array
sig
must be at least
.
where appears in this document, it refers to the array element
.
On entry: information defining the variance-covariance matrix,
.
- or
- sig must hold the lower or upper portion of , with held in . The supplied variance-covariance matrix must be positive semidefinite.
- is a diagonal matrix and the th diagonal element, , must be held in
- or
- sig must hold or , the lower or upper Cholesky decomposition of , with or held in , depending on the value of iuld. No check is made that or is a valid variance-covariance matrix. The diagonal elements of the supplied or must be greater than zero
-
9:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
sig.
Constraints:
- if , ;
- otherwise .
-
10:
– double
Output
-
On exit:
or
depending on the value of
ilog.
-
11:
– Integer *
Output
-
On exit: , rank of .
-
12:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
- NE_ARRAY_SIZE
-
On entry, .
Constraint: if , .
On entry, .
Constraint: if , .
On entry, and .
Constraint: .
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_DIAG_ELEMENTS
-
On entry, at least one diagonal element of is less than or equal to .
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
- NE_MAT_NOT_POS_DEF
-
On entry, is not positive definite and eigenvalue decomposition failed.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
- NE_NOT_POS_SEM_DEF
-
On entry, is not positive semidefinite.
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example prints the value of the multivariate Normal PDF at a number of different points.