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!
mxComputeEM(e,p,mstep=m)
is equivalent tomxComputeEM(estep=mxComputeOnce(e,p), mstep=m)
. The old style continues to work, but the new style may be more suitable for your needs.I am curious to learn more about how you wish to implement your model.
Thanks a lot Joshua! However, for mxComputeOnce (version 2.11.5) the "..." is "Not used", so I can't use "expectation = ; predict = " as arguments. Do you have idea how else can I input the estep or work with mxComputeOnce?
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 withestep=mxComputeOnce('E')