# Distribution of the residual sum of squares for *multivariate* linear regression

I want to ask about a multivariate generalization of this previous question.

It is a well established fact that in univariate (i.e. the response $y$ is univariate) linear regression, that the residual sum of squares (RSS) divided by the variance $(\sigma^2)$ has chi-squared distribution.

$$\frac{\textrm{RSS}}{\sigma^2} \sim \chi^2_{n-p}$$

However, in the case where the response is multivariate (say of dimension $q$), is there any equivalent statement we can make about the residual sum of squares?

Suppose that each row of the error matrix $\mathcal{E}$ has distribution $N_q(\mathbf{0}, \Sigma)$, where $\Sigma$ is a variance covariance matrix.

I know that we can create a RSS matrix as follows: $$\mathbf{S} = \mathbf{Y}^T(I_n - H)\mathbf{Y},$$

where $\mathbf{Y}$ is the $n \times q$ matrix of responses and $H$ is the usual "hat" matrix.

But what if we get a residual vector as follows? $$(I_{nq} - (I_q \otimes H))vec(\mathbf{Y})$$ (here $\otimes$ denotes the Kronecker product).

I want to be able to say something like $$\frac{RSS}{\det(\Sigma)} \sim \chi^2_{n-p},$$ however I am not sure if this is justified.

Is there any sort of statement that can be made about the RSS for a OLS estimator in the multivariate case, where the errors/residuals are not considered independent?