Estimation of class transitions
Posted on

Currently, I am studying three mixed variables in which I expect dissimilar classes for each of the three variables. It is not unlike example 8.2 in the Mplus manual (only with continuous variables). I can do this in Mplus, but I am wondering if it is also possible in OpenMx. So I need to define separate classes for each variable, but the definition of the model is a puzzle to me. Is it possible (yet)? If so, how do I define the matrix of class probabilities and how do I bind the six classes and their objectives together?
My copy of the Mplus manual
Rather than think of each person being simultaneously in three classes (one of two classes in each of the three variables), I'd think of there being 8 classes, one for each combination of binary class membership (2^3), with appropriate constraints across classes. To make things very simple, we'll say you have three variables x, y and z. These three variables are each assumed to be mixtures of two normal distributions, varying in their mean and variance across classes. I'll further assume that each class differs in its covariances between the three variables for simplicity, though including those parameters may make the model difficult to estimate. I'm writing code directly in the window, so I apologize for unforseen errors. Here's how I'd make the model for class 1 (or class 111, as it is).
class1 <- mxModel("Class111",
mxMatrix("Symm", 3, 3, free=TRUE,
values=c(1, .5, .5, 1, .5, 1),
labels=c("x1", "xy111", "xz111", "y1", "yz111", "z1"),
name="Cov111"),
mxMatrix("Full", 1, 3, TRUE, 0, c("mx1", "my1", "mz1"), name="Mean111"),
mxFIMLObjective("Cov111", "Mean111", dimnames=names(data))
Class 2 (or class 112) would then have change the z1 and mz1 parameters, leaving the x1, mx1, y1 and my1 alone.
class2 <- mxModel("Class112",
mxMatrix("Symm", 3, 3, free=TRUE,
values=c(1, .5, .5, 1, .5, 1),
labels=c("x1", "xy112", "xz112", "y1", "yz112", "z2"),
name="Cov112"),
mxMatrix("Full", 1, 3, TRUE, 0, c("mx1", "my1", "mz2"), name="Mean112"),
mxFIMLObjective("Cov112", "Mean112", dimnames=names(data))
And so on and so on for all eight classes. Classes 111, 112, 121 and 122 would all have the same parameters for x, while classes 211, 212, 221 and 222 would have a second set of x parameters, essentially creating two classes of x. Put them all in a container model and define the class probabilities just as we did in the previous thread.
-ryne
Log in or register to post comments
In reply to My copy of the Mplus manual by Ryne
Sorrie I led you astray with
Log in or register to post comments