Rewrite Matrix normal distribution likelihood

34 Views Asked by At

I have already posted a similar question on cross-validated but with no answer so far https://stats.stackexchange.com/questions/618972/how-to-write-the-likelihood-for-a-multivariate-gaussian-linear-model, I am trying my luck here since it's a more mathematical question than a data-analysis one.

Let's ignore the context and focus on the mathematical aspects. I have some kind of multivariate gaussian likelihood (a matrix normal to be rigorous) for J outcomes and N individuals, where the N individuals can be separated into two conditions, 0 and 1, respectively.

Formally, the model can be written as:

$$ P(W | X, \beta, \Sigma_{0}^{-1}, \Sigma_{1}^{-1}) = \prod_{i}^N |(1 - z_i)\Sigma_{0}^{-1} + z_i \Sigma_{1}^{-1}|^{\frac{1}{2}}\exp\{\frac{1}{2} (W_{i.} - X_{i.}\beta)((1 - z_i)\Sigma_{0}^{-1} + z_i \Sigma_{1}^{-1})(W_{i.} - X_{i.}\beta)'\} $$

with $W$ of dimension NxJ, $X$ of dimension Nx(K+1), $\beta$ of dimension (K+1)xJ, $\Sigma_{0}^{-1}$ and $\Sigma_{0}^{-1}$ two precision matrices of size JxJ. $z_i = 0$ if the individual i belongs to condition 0, 1 otherwise. Also, we refer to $s_{jj}$ and $s_{jj'}$, as the variance and covariance parameters for a given condition.

Here I am trying to rewrite the model with respect to individual $\beta$ parameters and variance/covariance elements. Indeed, I am in a fully bayesian framework, assuming some priors on $\beta_{kj}$, $s_{jj}$ and $s_{jj'}$. The final aim is to estimate variance and covariance elements in both conditions (precision matrix in fact in two conditions).

Here my attempt to rewrite the model w.r.t $\beta_{kj}$. I have just decomposed the matrix product as a product over the J outcomes and K+1 covariables. Formally:

$$ = \prod_{i}^N \prod_{j}^J \prod_{k}^{K+1} |(1 - z_i)s_{0_{jj}}^{-1} + z_i s_{1_{jj}}^{-1}|^{\frac{1}{2}}\exp\{\frac{1}{2} (W_{ij} - X_{ik}\beta_{kj})^2((1 - z_i)s_{0_{jj}}^{-1} + z_i s_{1_{jj}}^{-1})\} $$

$$ = \prod_{i}^N \prod_{j}^J|(1 - z_i)s_{0_{jj}}^{-1} + z_i s_{1_{jj}}^{-1}|^{\frac{(K+1)}{2}} \exp\{\frac{1}{2} \sum_{i}^N \sum_{j}^J \sum_{k}^{K+1}(W_{ij} - X_{ik}\beta_{kj})^2((1 - z_i)s_{0_{jj}}^{-1} + z_i s_{1_{jj}}^{-1})\} $$

Moreover, inspiring from https://www.math.wustl.edu/~sawyer/handouts/multivar.pdf, I tried to rewrite the model w.r.t $s_{jj}$ and $s_{jj'}$, giving:

$$ = \prod_{i}^N \prod_{j}^J \prod_{j'}^J \prod_{k}^{K+1} |(1 - z_i)s_{0_{jj'}}^{-1} + z_i s_{1_{jj'}}^{-1}|^{\frac{1}{2}}\exp\{\frac{1}{2} (W_{ij} - X_{ik}\beta_{kj})((1 - z_i)s_{0_{jj'}}^{-1} + z_i s_{1_{jj'}}^{-1})(W_{ij'} - X_{ik}\beta_{kj'})\} $$ $$ = \prod_{i}^N \prod_{j}^J \prod_{j'}^J |(1 - z_i)s_{0_{jj'}}^{-1} + z_i s_{1_{jj'}}^{-1}|^{\frac{(K+1)}{2}}\exp\{\frac{1}{2}\sum_{i}^N \sum_{j}^J \sum_{j'}^J \sum_{k}^{K+1} (W_{ij} - X_{ik}\beta_{kj})((1 - z_i)s_{0_{jj'}}^{-1} + z_i s_{1_{jj'}}^{-1})(W_{ij'} - X_{ik}\beta_{kj'})\} $$ This model is equivalent to the previous one when j = j'.

Are my two notations correct and equivalent to the initial model ? Is there a way to conciliate the two rewritings within a single model ? I need some external validations to check whether my models are correctly rewritten. I did not find references which discuss precisely these types of rewritings. Maybe it does not make any sense, it's the first time I use these kinds of models, and I am stuck since a while with this.

Any insights are welcome.