Difficulties running Ordinal Twin Model

Posted on
No user picture. abhworthington Joined: 06/09/2010
Hello everyone!
In the process of learning a bit more about how OpenMX works and getting up to speed on twin study methodology, I have been running some of the presentation scripts from the Boulder conference's intro seminar. I'm having a bit of a problem with one of the scripts for binary outcome twin models and was hoping that someone recognized the issue. The script I am using is here: http://ibg.colorado.edu/cdrom2010/rijsdijk/OrdinalTwinAnalysis/Binary/UnivACE_MatrRawOrd.R

Everything appears fine (after changing the script to remove protected characters) until I attempt to run the TwinSat model. I am getting an error message that states: "Error: In model 'twinSat' column 'cast90_tw1' is not an ordered factor. Use mxFactor() on this column."

Normally, I would just follow the instruction, but looking at the data, it appears that the only responses in that column are 0 and 1. So, using mxFactor would, if I understand it correctly, not change any of the values. I know the conference was in March, so there may have been updates to the package since then that require this step, but I didn't want to get into the habit of doing this every time if it isn't necessary.

Thanks in advance for all of your help!

Replied on Thu, 08/19/2010 - 18:47
Picture of user. tbates Joined: 07/31/2009

Several of the Boulder 2010 scripts are now out of date in ways that either still work but are inefficient because functions like diag were not available, or else are broken now, because of changes to the program (ordinal suffers from this more than most areas... but covariates also I think).

I guess they are going to come high in the google hit list and should probably be fixed to work or pulled off line as they will start many users off on OpenMx with scripts that are broken.

Replied on Thu, 08/19/2010 - 19:07
Picture of user. mspiegel Joined: 07/31/2009

In reply to by tbates

Yes, the specification of FIML objectives with ordinal data has changed since the Boulder workshop. We will have some sections in the OpenMx User Guide very soon on the new specification. OTOH, the old specification should still work. It's just that the old specification is uglier to read when compared to the new specification. With regards to the question posted by abhworthington: each column of ordinal data must be an ordered factor. Use the function mxFactor() to convert that column into an ordered factor. See ?mxFactor for more help on using that function. To convince yourself that the column is not an ordered factor, use the built-in function is.ordered() on that column. It should return FALSE.