Can pm.Wishart be used as a likelihood for an observed sample covariance?

Hi PyMC community,

I’m building an inverse model to estimate parameters that control transport of multiple elements in a fluid system. My observations are summary statistics: (1) mean values and (2) covariance matrices between elements. Given a parameter set, my physical forward model can also generate the corresponding mean vector and covariance matrix.

I would like to use a Wishart likelihood for the observed covariance matrix.
However, the PyMC docs for pm.Wishart say it is “unusable in a PyMC model” and recommend LKJCholeskyCov / LKJCorr instead
(see the link below:
https://www.pymc.io/projects/docs/en/latest/api/distributions/generated/pymc.Wishart.html)

My understanding is that this warning mostly refers to using Wishart as a prior (because MCMC would have trouble proposing symmetric positive-definite matrices). In my case I use Wishart only as a likelihood with observed=Sigma_obs (so no sampling of matrices, only evaluation of the log-likelihood).

Question: Is it reasonable to use pm.Wishart as a likelihood for an observed covariance matrix in PyMC? If not recommended, what is the preferred alternative when the data I have are mean and covariance?

Really appreciate any idea or suggestion!

I don’t see why not. If you use cov_hat = pm.Wishart(..., observed=cov_data) does it raise an error?