# EM algorithm for fitting GMM in multivariate case in R

I am currently playing around with Gaussian Mixture Models in order to model stock returns. Part of all this is using the EM algorithm to obtain MLE of parameters. I have found a package in R (mixtools) that provides the functions normalmixEM and mvnormalmixEM. I have tried it but I don't understand the output for mvnormalmix (my input consisted of a 200x2 matrix): Why do I get for two components two 2x1 mu-vectors and why do I get two 2x2 covariance matrices? Isn't that one too many?

If you could clear that up or give me a link where the output of the multivariate case is explained (because I find it in general a bit confusing) I would very much appreciate it.

-

I guess the output is expected. If you model the returns of $n$ stock using a simple gaussian mixture process with $s$ states, the outputs will consist of $s$ vectors $\mu_i$ of size $n \times 1$, $s$ matrix $\Sigma_i$ of size $n \times n$ and $1$ transition matrix $P$ of size $s \times s$.
Indeed, knowing the state $i$, you have a multivariate gaussian model for the $n$ returns, hence parameters $\mu_i$ and $\Sigma_i$.
To describes how the model goes from one state to the other, the transition matrix $P$ contains $$p_{ij} = P[s_{t+1}=j|s_t = i]$$
Thanks for the answer! For the case with 2 stocks and 2 components, is it correct when I say that the first $\mu$-vector contains the mean of the two components for the first stock? Even if this is correct, I cannot interpret $\Sigma$. Usually $\Sigma$ denotes the covariance matrix - but that would mean I have 4 variances and 2 covariances. Could someone explain what each value in both $\Sigma$ signifies? – rexcel Jan 18 '13 at 20:06
If you have two stocks and two regimes, for each regime there is 2 expected returns, 1 correlation and 2 standard deviations. Correlation and standard deviations are stored in the $\Sigma$ matrix. – ThePawn Jan 21 '13 at 10:13
So, the correlation in the $\Sigma_1$ matrix denotes the correlation between stock 1 and stock 2 for observations that belong to component 1? – rexcel Jan 21 '13 at 21:17
Yes, $\Sigma_1$ is the variance-covariance matrix for regime $1$. – ThePawn Jan 22 '13 at 0:15