OpenMx Structural Equation Modeling

Posted on
No user picture. IvanVoronin Joined: 08/18/2013

Mixed effects model - matrix specification

Hello,

I am looking for advice with regard to the implementation of mixed effects model in OpenMx. 

I am starting with a simple model where one dependent variable Y is predicted by four correlated variables X1-X4. The participants in the sample are clustered in pairs (they are twins).

Posted on
No user picture. Ilaria Joined: 07/22/2024

Problems with Constrain expected Means and Variances to be equal across Twin Order

Hi all,

I am trying to fit several bivariate [between my exposure at age 16 and my outcomes at age 21 (accounting for age and sex)] and trivariate [my exposure at age 16 and my outcomes at ages 21 and 26 (also accounting for age and sex)] ACE models. However, I’ve started by fitting univariate saturated and submodels, followed by ACE and submodels, to eventually fit my bivariate models. The saturated models run fine across all, but when I try to fit the constrained models (by twin order and zygosity), I get the following error message:

Posted on
No user picture. didenursahin Joined: 03/20/2023
Posted on
No user picture. Tugce Yildiz Joined: 01/15/2024

NA CIs for Bivariate Model

Hi, I am trying to run a bivariate model with two variables and 2 covariates. However, I get NA !!! for BivA, BivC and BivE. Can you help me solve this issue?

Here is the script:

### SELECT VARIABLES HERE
data_file <- "Cerebellum_volumes.csv"
variable_input1 <- "lsas_total"
variable_input2 <- "Vermis_VII"
cov1 <- "Total_Cerebel_Vol"
cov2 <- "age"

### Import data
dat <- read.csv(file=data_file, header=TRUE, sep = ";")

Posted on
No user picture. lior abramson Joined: 07/21/2017

checking total h2 at time 2 in a longitudinal choelsky model with paths script

Hello,
I am conducting a longitudinal Cholesky model with one variable in two time points.
I use the script written below with paths.
How can I modify this script to find for the total h2 at time 2? that is, I want to find the heritability explained by both the genetic effect from time 1 and the genetic effect from time 2, and the confidence interval of this estimate.
Thank you very much for your help

Posted on
No user picture. jkraemer Joined: 12/18/2022

goodness-of-fit indices for ML SEM

I have been asked by a reviewer to offer a better justification for the fit of my proposed ML model by "indicating the fit of the within and between model separately". After reading several chapters made for MPlus, I first looked to mxRefModels(). But, I am under the impression that it does NOT work with ML SEM. So, I tied to make the saturated and independence models for within and between myself for the various calculations. I was successful regarding the independence model but not the saturated model.

Posted on
Picture of user. Ben Joined: 06/20/2023

Best Practices for 3lvl measurement SEM

I'm currently building a 3lvl MSEM including measurement models. The Pritikin et al. (2017) paper is relevant and helpful but whereas they have observed variables on every level, I mainly want to use levels to control for the between-part of the variance of items I measured only on the 1st level. Hence, I want to make sure I don't misclassify my model (see below). Assuming the model is right, I'm also grateful on tips how to deal with a non-convex Hessian when trying to fit it.

Posted on
Picture of user. Ben Joined: 06/20/2023

Problems with non-convex Hessian with multilevel SEM

As written in this thread, I have repeated problems with a non-convex Hessian while working my way step-wise towards a 3-level SEM with latent variables and their respective measurement items in a paper in organizational psychology.

While I'm looking for general guidelines to deal with non-cenvex Hessians and status code 5-issues in that thread, it's probably good to look at my models to find issues here.

Posted on
Picture of user. Ben Joined: 06/20/2023

General strategies to deal with non-convex Hessian matrix

Hello everyone!

I am working on a org psych paper that is currently under review. **The model** is a quite complex *multilevel mediation SEM*, featuring *four latent variables* (only one is exogenous/independent, the others are endogeneous mediators/outcomes). I also include the *measurement models* for each variable (i.e., the respective items as manifest variables). Until now I have done the estimations in a 2-level model using lavaan. For the review I am trying to add a third level to control for further nestedness.

Posted on
Picture of user. pehkawn Joined: 05/24/2020

Understanding runHelper() error: MxExpectationRAM: latent exogenous variables are not supported

I've been trying to modify [this example](https://github.com/OpenMx/OpenMx/blob/master/inst/models/nightly/mplus-ex9.23.R) from OpenMx' repos for testing. For this purpose, I am trying to fit the model using WLS. However, this returns the following error message:


Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
MxExpectationRAM: latent exogenous variables are not supported (x -> sw)