For the linear model,
$$ bf{Y} = mu_{Y} + bf{B}^t left(bf{X}-bf{mu_X}right) + boldsymbol{epsilon} $$
Where, $bf{Y}$ is a $n times q$ matrix of $q$ responses, and $bf{X}$ is a $n times p$ matrix of $p$ predictors. The variance of $bf{Y|X}$ is,
$$ bf{Sigma_{YY} – Sigma_{YX}Sigma_{XX}^{-1}Sigma_{XY}} $$ and the regresion coefficients is $$ bf{B} = Sigma_{YX}Sigma_{XX}^{-1} $$
I want to calculate the coefficients of determination $bf{R}$ which is a $q times q$ matrix for each $bf{Y}$,
$$ bf{R} = begin{bmatrix}
bf{R}_{1}^2 & ldots & bf{R}_{1q} \
vdots & ddots & vdots \
bf{R}_{q1} & ldots & bf{R}_{q}^2 \
end{bmatrix}$$
How can I express this relation in terms of $bf{X}$ and $bf{Y}$.