OpenMx Structural Equation Modeling

Posted on
Picture of user. tbates Joined: 07/31/2009

RAM estimation from covariance matrix where ns differ per cell

hi all, When mxData is a cov or cor matrix, numObs is just one number. Quite often the cells in a covariance matrix could take advantage of different numbers of observations. Two questions: has anyone made RAM models with an "numObs" matrix to give a per-cell n? And second, are the assumptions of a covariance-based model violated if all data do not come from complete subjects?

Posted on
Picture of user. mhunter Joined: 07/31/2009

Try My LISREL Objective

I've added a way to specify and fit LISREL models in OpenMx. The function is called mxLISRELObjective and it operates very similarly to the mxRAMObjective function. Currently, only matrix specification of LISREL models is possible, but I'm working on path specification.

Posted on
Picture of user. tbates Joined: 07/31/2009

MIMIC model : Expected covariance matrix is non-positive-definite.

Hi all,

Any clues on getting this mimic model working? I've explored a range of start-vals... always getting NonPosDef
omx seems not to like models with formative structures (i've got it going with the formative measures having residual variance, rather than being correlated)

Example is from chapter 13 Schumacker and Lomax Beginner's guide to SEM

data <- data.frame(matrix(c(
1.000, 0.304, 0.305, 0.100, 0.284, 0.176,
0.304, 1.000, 0.344, 0.156, 0.192, 0.136,
0.305, 0.344, 1.000, 0.158, 0.324, 0.226,
0.100, 0.156, 0.158, 1.000, 0.360, 0.210,

Posted on
Picture of user. rabil Joined: 01/14/2010

Creating a function that creates OpenMx models

I'm trying to write an R function that would create and run an OpenMx model. I can do this for a simple one factor model. I read in a data.frame for the data and construct all the paths and then do an mxRun. This works regardless of the number of variables in the data.frame. But I want to generate mxAlgebra statements (and other statements, like including parameters in an mxCI statement) which change depending on the number of variables.

Posted on
No user picture. brauer Joined: 01/28/2012

CI for RMSEA, p close, residual correlation matrix

Hi,

Thanks to the script below (suggested by Athanassios Protopapas and further developed by Paolo Ghisletta, thank you!!!) I was able to obtain a large number of fit indices, but I still don't know how to get (a) the 90% confidence interval for RMSEA, (b) p close (the test of the null hypothesis that RMSEA (in the population) in less than .05), and (c) the residual correlation matrix. Can anyone help me?

Posted on
No user picture. fife Joined: 07/01/2010

Can't replicate sem package in R

I'm slowly converting to OpenMX because of its fiml capabilities. I recently built two models that are shown in the enclosed attachments. You will notice that the correlation between T and P is identical in both models (whether S or D is used). However, when I try to replicate these results in OpenMX, I don't get identical results; they're usually about .04 different, which is quite significant for what I'm doing.

Here's my openMX code:

sem.model.S = mxModel("Two Factor Model Path Specification",
type="RAM",
dd,
manifestVars = names(data),
latentVars = c("T", "P"),

Posted on
Picture of user. suzannejak Joined: 01/06/2010

constraint on algebra result

Dear all,

I would like to add a constraint in my EFA model to ensure that Z is diagonal. Z is a function of other matrices. I used an mxConstraint, where J is a conformable identity matrix. My question is, do you see a way of specifying this using labels instead of an mxConstraint?

algebraZ = mxAlgebra(expression = t(L)%*%G%*%solve(F), name = "Z") # should be diag

constraint1 = mxConstraint(Z == J*Z, name = "oblique")

Thanks in advance, I can give my full code if needed.

Suzanne

Posted on
Picture of user. DavidCross Joined: 06/27/2011

Fitted correlation/covariance matrix (or residual matrix)

I am curious if there is a straightforward way to obtain either the fitted covariance/correlation matrix or the residual matrix?

TIA