I am trying to estimate a regime switching model with an autoregressive component using the EM algorithm. The process itself can be presented this way:
$$ r_{t}= A_{n \times (n+1)} \boldsymbol x_{t-1} + \epsilon_{t} \\ where\quad \boldsymbol x_{t-1} = \binom {const} {r_{t-1}}$$
In the normal case with the mean instead of the VAR process the maximization step is straighforward with $\mu$ calculated in each iteration by taking the derivative of the log likelihood as described here: How to take derivative of multivariate normal density? .
However, I don't know how to calculate the coefficients matrix $A$ in each maximization step. $$ \frac{ \partial {\bf L} }{ \partial {\boldsymbol A}} = -\frac{1}{2} \left( \frac{\partial \left( {\boldsymbol y} - {\boldsymbol A\boldsymbol x} \right) {\boldsymbol \Sigma}^{-1} \left( {\boldsymbol y} - {\boldsymbol A\boldsymbol x}\right) }{\partial {\boldsymbol A}} \right) $$
How can it be solved analytically and is it this approach correct in a ML estimation with the EM algorithm? I am really stuck and would appreciate any help.