Example Scripts for mxComputeEM?

4 posts / 0 new
Offline
Joined: 07/22/2018 - 15:34
Example Scripts for mxComputeEM?

Dear All,

I wonder if anybody could share example scripts involves using mxComputeEM?

The only sample code I found is in paper by Paritikin, Hunter, and Boker 2015 conducting item factor analysis https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4822086/, where mxComputeEM is called with arguments: "expectation = , predict = ". However, as the help file (version 2.11.5) of mxComputeEM suggests, these two arguments are deprecated, and an argument called "estep" should be used.

I am trying to use mxComputeEM to fit multivariate Gaussian mixture models. Any sample code for this kind of finite mixture models would be helpful as well.

Thanks a lot!

Offline
Joined: 05/24/2012 - 00:35
examples

mxComputeEM(e,p,mstep=m) is equivalent to mxComputeEM(estep=mxComputeOnce(e,p), mstep=m). The old style continues to work, but the new style may be more suitable for your needs.

The ... argument only prohibits unnamed arguments. It doesn't mean that you can't use the arguments, you just have to name them. Will you use an mxAlgebra for your estep? If so, you can create the mxAlgebra(..., fixed=TRUE, name="E") and then recompute it in your estep with estep=mxComputeOnce('E')