OpenMx Structural Equation Modeling

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.
- Read more about Try My LISREL Objective
- 1 comment
- Log in or register to post comments

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,

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.

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?

Should OpenMx warn about duplicate path definitions?
Hello everybody,

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"),
- Read more about Can't replicate sem package in R
- 4 comments
- Log in or register to post comments

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
- Read more about constraint on algebra result
- 2 comments
- Log in or register to post comments

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

examples of parameter constraints possibly with mxAlgebra?
Does anyone have or know of where I could find examples of models where some paths are functions of other parameters? For example, suppose I wanted to estimate two parameters for three paths so the third was a function of the first two: a, b, b + a/2. I've been looking at the ABO blood group example in the documentation, which does some things similar to what I want, but it is a stretch.
Thanks in advance!

non-positive-definite when arrows=2
Whenever I try to fit models and add covariances with arrows=2, I always have a heck of a time getting the model past the 'expected covariance is non-positive definite' error. Is this normal? I do not have nearly this much trouble with arrows = 1. Here is a little example using a built in dataset:
#########################
summary(mxRun(m <- mxModel("Example", type = "RAM",
manifestVars = colnames(ability.cov$cov), latentVars = "G",
mxData(ability.cov$cov, type = "cov", numObs = ability.cov$n.obs),
mxPath(from = "G", to = colnames(ability.cov$cov)),
- Read more about non-positive-definite when arrows=2
- 3 comments
- Log in or register to post comments
Pagination
- Previous page
- Page 8
- Next page