Attachment | Size |
---|---|
Script binary depvar [6] | 10.49 KB |
Script ordinal depvar [7] | 11.15 KB |
Hello,
I wrote a script to test a threeway GxE where one moderator is continuous (mod1) and the other is binary (mod2) and the dependent variable (depvar) is ordinal (4 categories). While there is no within-twin-variance of mod1 (family-level-variable education of parents), the values of mod2 can differ within a pair (MZ and DZ) (birth weight of twins). So there are six groups in total: MZ high and high; MZ low and low; MZ high and low and the same for DZ's. The aim of the model is to test whether the moderation of the effect of one of the components on depvar by mod1 are the same in the groups defined by mod2 (high weight and low weight). There are no NAs on mod1 or mod2 in the sample used for the analysis. The "oppsite pairs" are always in the same order so that twin 1 is high and twin 2 is low. The model runs fine with mxTryHardOrdinal() and the solution seems robust across optimizers (NPSOL and SLSQP; CSOLNP seems to be very slow: it does not report any progress like the best fit so far, so I stopped it after 20 minutes). But I get the following warning:
The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
In several threads in this forum I have read that this warning does not necessarily mean that there is something wrong with the model when using the liability threshold approach. But on the other hand I am not sure whether I made a mistake in the script (the multi-group-approach and moderation via the definition variable in the same script gave me some headache...) which causes the warning. So I would appreciate if somebody could check the script and tell me if there is something wrong with it.
For the SLSQP-runs I am using the OpenMx version 2.17 with R 4.0.2 on a Windows (64 bit). For the NPSOL-runs I downgraded R to 3.6.3 on the same machine since the NPSOL-OpenMx does not work with R>=4 at the moment. Also, following the message
Your ordinal model may converge if you reduce mvnRelEps
try: model <- mxOption(model, 'mvnRelEps', mxOption(model, 'mvnRelEps')/5)
I reduced the mvnRelEps, but that did not make the warning disappear. I collapsed the ordinal dependent variable into a binary variable (constraining Var(Y|M=0)=1 and Mean(Y)=0) but here the same issue arises.
I thought about running the models for the high and low group seperately but I am not sure how to deal with the opposite pairs.
Thank you!