I am familiar with regression linear models, and EM algorithms. However, I do not get the idea of fitting the mixture of regression linear models using the EM algorithm. So, what I think about it is as follows:
- fit the first linear regression model and then estimate the coefficient. Then, find the density of the fitted model. I am confused about this part, as there is no density for the linear regression!
- Repeat the first step with the second regression model.
- Run EM algorithm.
Is that correct? Could someone help me with an example and manual implementation, please? I knew that there are some R packages, but I would like to understand the implementation manually.