Filed under: ADMB Tricks
Parameterization via the Cholesky factor (Incomplete example)
If you want to estimate the parameters of a covariance matrix S you must ensure that the resulting matrix is:
-
symmetric and
-
positive definite.
To achieve this you do not parameterize S directly, but rather its Cholesky factor L, i.e. S = LL', see <http/en.wikipedia.orwikCholesky_decomposition>
The following two step procedure is recommended:
-
Parameterize the correlation matrix C via the Cholesky factor as explained here Correlation matrix
-
Scale C with the standard deviations to obtained S.
Complete example given in C.tpl and C.dat.
Constrained covariance matrices
Sometimes you want elements in the C (or S) to be zero, say S(1,2) = 0, meaning the element 1 and 2 are uncorrelated. An example of how to achieve this is provided here: