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

By *winston*

Created *12/22/2009 - 13:11*

Tue, 12/22/2009 - 13:11 — winston [1]

Hi, I'm trying to figure out how to specify models with categorical outcomes. Can you get me started with a modification of your simple example below -- how would you change it to work for categorical outcomes?

require(OpenMx)

data(demoOneFactor)

manifests <- names(demoOneFactor)

latents <- c("G")

factorModel <- mxModel("One Factor",

type="RAM",

manifestVars=manifests,

latentVars=latents,

mxPath(from=latents, to=manifests),

mxPath(from=manifests, arrows=2),

mxPath(from=latents, arrows=2, free=F, values=1.0),

mxData(cov(demoOneFactor), type="cov", numObs=500))

summary(mxRun(factorModel))

**Links:**

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

[2] http://openmx.psyc.virginia.edu/thread/643

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

[4] http://openmx.psyc.virginia.edu/forums/opensem-forums/categorical-outcomes