I am attempting to conduct a genomic SEM with a GxE term and a term for the effect of G on E. The model would also include 11 other covariates. The study was a case-control design.

I used the R package gwsem to conduct a GxE analysis without the effect of G on E. However, I can not use it for the current analysis since the package does not permit a term to be a covariate and a dependent variable.

I have tried to create a custom model by writing mxPath statements from OpenMx, but I ran into two problems. One, I am not sure how to specify the interaction term. Two, I get an error message when I run mxRun that the E term is not specified although it is included in two path statements: once as from=E and once to=E.

How would I specify such a model in gwsem or OpenMx? Or is there another R package or program to create this type of model?

I would greatly appreciate any help in specifying my model.

Any reasons why you can't just go with a logistic regression framework? By experience, using OpenMx is akin to opening a can of worms, you'll spend more time diagnosing problems than solving them. Logistic is straightforward.

Otherwise you might get more help by going to the OpenMx forum. I found that the authors of OpenMx are quite responsive.

https://openmx.ssri.psu.edu/forums/opensem-forums