Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *Ryne*

Created *03/16/2010 - 12:21*

Tue, 03/16/2010 - 12:21 — Ryne [1]

Hi all,

Having some trouble with a growth mixture model. I looked to previous examples in the /models/passing directory (specifically LCAlazarsfeld.R, Acemix.R and Acemix2.R) and thought the code below would work. To summarize, I created two models for the two classes (differing in a small set of parameters a, r and d), and put them both in a parent model that contains the data and an objective function that sums the (vectorized) objective functions from the two child models. When run, the code below fixes the class probabilities at .5 for each class and yields the same -2LL as the single-class model. Parameters stayed fixed at their starting values for the class-dependent parameters, with standard errors at zero.

My conceptual problem with the code is with the class probability variable as a scalar value, when I would think it would be individually varying. Any help you can give would be appreciated.

Attachment | Size |
---|---|

Gompertz Mixture.R [2] | 8.19 KB |

**Links:**

[1] http://openmx.psyc.virginia.edu/users/ryne

[2] http://openmx.psyc.virginia.edu/sites/default/files/Gompertz Mixture.R

[3] http://openmx.psyc.virginia.edu/thread/633

[4] http://openmx.psyc.virginia.edu/thread/598

[5] http://openmx.psyc.virginia.edu/forums/opensem-forums/mixture-distribution-and-latent-class-models