lnpdfmvn#
Purpose#
Computes multivariate Normal log-probabilities.
Format#
- z = lnpdfmvn(x, corr)#
- Parameters:
x (NxK matrix) – values at which to evaluate the multivariate normal log probabilities.
corr (KxK matrix) – correlation matrix.
- Returns:
z (Nx1 vector) – log-probabilities.
Examples#
Example 2#
// Correlation matrix
corr = { 1 0.60 , 0.60 1 };
// X values
x1 = seqa(-3, .2, 3/.2);
x2 = seqa(-3, .2, 3/.2);
x = x1~x2;
z = lnpdfmvn(x, corr);
print "z =";
z;
After the above code:
z = -7.23973
-6.51473
-5.83973
-5.21473
-4.63973
-4.11473
-3.63973
-3.21473
-2.83973
-2.51473
-2.23973
-2.01473
-1.83973
-1.71473
-1.63973
Remarks#
This computes the multivariate Normal log-probability for each row of x.
Source#
lnpdfn.src