RATS 11.1
RATS 11.1

 

Parameters

Mean (\(\mu \)), Covariance matrix (\(\Sigma \)) or precision (\(\mathbf{H}\))

Kernel

\(\left\vert \Sigma \right\vert ^{-1/2}\exp \left( -\dfrac{1}{2}\left( x-\mu \right) ^{\prime }\Sigma ^{-1}\left( x-\mu \right) \right) \) or

\(\left\vert \mathbf{H}\right\vert ^{1/2}\exp \left( -\dfrac{1}{2\left(x-\mu \right) ^{\prime }\mathbf{H}\left( x-\mu \right) \right) \)

Support

\(\mathbb{R}^{n}\)

Mean

\(\mu \)

Covariance Matrix

\(\Sigma \) or \(\mathbf{H}^{-1}\)

Main Uses

Distribution of multivariate error processes. Asymptotic distributions. Prior, exact and approximate posteriors for a collection of parameters with unlimited ranges.

Density Function

%LOGDENSITY(sigma,u). To compute \(\log f\left(x|\mu ,\Sigma \right) \) use %LOGDENSITY(sigma,x-mu)

 

The same function works for univariate and multivariate Normals.

CDF

%BICDF(x,y,rho) returns \(P(X \le x,Y \le y)\) for a bivariate Normal with mean zero, variance 1 in each component and correlation rho. There are no known relatively simple calculations for CDF's above two dimension.s

Random Draws

%RANMAT(m,n) draws a matrix of independent \(N\left( 0,1\right) \).

 

%RANMVNORMAL(F) draws an n-vector from a \(N(0,\mathbf{F}\mathbf{F^{\prime }})\), where \(\mathbf{F}\) is any factor of the covariance matrix. This setup is used (rather than taking the

covariance matrix itself as the input) so you can do the factor just once if it's fixed across a set of draws. To get a single draw from a \(N(\mu ,\Sigma)\), use

 

MU+%RANMVNORMAL(%DECOMP(SIGMA))

 

%RANMVPOST, %RANMVPOSTCMOM, %RANMVKRON and %RANMVKRONCMOM are specialized functions which draw multivariate Normals with calculations of the mean and covariance matrix from other matrices.


 


Copyright © 2026 Thomas A. Doan