You are here

Code 6 Error in the second stage

4 posts / 0 new
Last post
Arant's picture
Offline
Joined: 01/23/2017 - 16:31
Code 6 Error in the second stage
AttachmentSize
Binary Data code.R859 bytes
File Data.csv1.58 KB

Hi all, Hi Mike,

I really appreciate Mike's guidance in TSSEM.

I recently encountered the code 6 error (https://openmx.ssri.psu.edu/wiki/errors) in the last step of my TSSEM analysis.

I think it might be because there are too many missing values in the data: after I deleted rows with two NAs, it worked.

I am just wondering if there are any alternative solutions for code 6 error in TSSEM? I noticed that mxTryHard can be used to get a better result but I am not so sure about it....

Hope to know more about how to deal with Code 6 Error occurred in TSSEM.

Btw,
My data and code are also attached.

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Hi Arant,

Hi Arant,

It works fine in the latest version of OpenMx and metaSEM. You may update your OpenMx and metaSEM packages and see if it helps. If you encounter code 6 error again, you may try the rerun() function.

P.S. I have corrected some minor errors in your R code.

Best,
Mike

File attachments: 
Arant's picture
Offline
Joined: 01/23/2017 - 16:31
Thank you Mike.

Thank you Mike.

I was able to run it with the revised code.

I would like to know if it is possible to do the following case:

In my model, I have T, E, and S, three variables, and Variable T has three subgroups, T1, T2, and T3.
Can I use T1, T2, T3 rather than T in the matrix, and add T as a latent variable?
i.e. the matrix will be T1 T2 T3 E S.

what if T1 and T2 are exclusive of T3? (That is, when there is T3, there will not be T1/T2, like attached pic about the model)
how will the matrix look like?

I attached a sample matrix, X and Y are not available. What value should I put?

Thank you so much for your help.

File attachments: 
Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Yes, latent variables are

Yes, latent variables are allowed.

Similar to other structural equation models, you have to make sure that the model is identified.