Hello,
I am trying estimate the covariance matrix parameters of a multivariate normal distribution \boldsymbol{X} \sim \mathcal{N}(\boldsymbol{\mu},\boldsymbol{\Sigma)}. In this case, \boldsymbol{X} is 3-dimensional. Assume \boldsymbol{\mu} is known.

I have a priori theoretical reasons for wanting to incorporate the following constraints on \boldsymbol{\Sigma}.

Thus, I would like to estimate the three parameters (a,b,c) that determine \boldsymbol{\Sigma}.

I have read, on this forum and in Stan’s documentation, the methods that Stan has for ensuring covariance matrices are positive semi-definite. However, I do not know how to incorporate constraints on \boldsymbol{\Sigma} in Stan.

I am new to estimating covariance matrices, so any guidance would be much appreciated.

Hi, the constraint on the diagonal entries is straightforward because you can decompose \Sigma into SRS, where S is a diagonal matrix of standard deviations and R is the correlation matrix. So you would have the one parameter a that fills in all the diagonal entries of S.

Imposing the off-diagonal constraints on R is trickier. I like the soft constraint approach described in this blog post of @Stephen_Martin . There are some other approaches based on the Cholesky factor, an overview is in my paper here.

I haven’t worked out the jacobian so I don’t suggest putting priors on the cholesky factor here but this will generate a cholesky factor corr with the given restriction