Hi All,

I'd like to run an ACE model - one variable is categorical (2 thresholds) and the other is really continuous, but I thought I'd recode it into deciles (as the joint continuous/categorical implementation in OpenMx 1.1 seems a little way off - and I wouldn't know where to start with the coding).

I think can handle the case of the same number of thresholds across variables, but I was wondering if anyone had a script allowing for a differing number of thresholds for variables, that they'd be willing to share? +/- Independent/Common Pathways.

Of course - it'd be great to hear from anyone who's tried joint categorical/continuous in the beta.

Thanks a lot,

Paul

It is certainly possible to define different numbers of thresholds for each variable. You build a thresholds matrix with one column for each variable, and one row for each threshold for whichever variable has the most thresholds. So if there are two variables, one with one threshold and one with nine, the resulting threshold matrix is 9x2. Because the first variable is an MxFactor with two levels, OpenMx will ignore any values in that column after the first one, so you can just fill it with zeros.

An easy way to build one of these that's fairly clear would be to generate your two threshold matrices separately, use rbind to pad the shorter one with zeros, and then cbind the two matrices together.

Something like:

Thanks Tim,

Maybe I'll try the beta.

I tried to install it using the command given on the news page, but get:

> source(http://openmx.psyc.virginia.edu/getNewOpenMx.R)

Error: unexpected '/' in "source(http:/"

I then tried using the commands that the above link to:

> repos > install.packages(pkgs=c('OpenMx'), repos=repos)

Warning: unable to access index for repository http://openmx.psyc.virginia.edu/testing/bin/macosx/leopard/contrib/2.13

Warning message:

In getDependencies(pkgs, dependencies, available, lib) :

package ‘OpenMx’ is not available (for R version 2.13.0)

On a mac with the latest version of R.

Thanks

We currently support R 2.12 and 2.11. Reverting to either of those versions should fix your problem with the linked commands.

Oh we should be able to provide users with a 2.13 install by giving them the 2.12 install. Place a symbolic link from the 2.13 directory pointing to the 2.12 directory.

Putting quotes (' ') around the source command: will also work once you are using 2.11 or 2.12. i.e. source('http://openmx.psyc.virginia.edu/getNewOpenMx.R')

This should now work with R 2.13 (the version you are using) just make sure you use the following source command:

source("http://openmx.psyc.virginia.edu/getNewOpenMx.R")

Tip of the cap to Spiegel for symbolic link directive.

Thanks Guys,

I reverted back to 2.12 and it works fine.

To Tim (and others with the know-how), would you be able to give me some advice/tips on how to do this. At the risk of embarrassing myself, I've attached a script (can also send the data if helpful), but I'm quite clueless as to the coding (normally take existing scripts and adapt them for my own use).

So you'd set the ACE model up as if it had 2 variables right - just as you would normally? Everything up until the means/thresholds statements is also essentially the same?

Stuck after that. If i try to run it I get:

Warning messages:

1: In matrix(values, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

2: In matrix(labels, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

3: In matrix(values, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

4: In matrix(labels, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

5: In matrix(values, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

6: In matrix(labels, nrow, ncol, byrow = byrow) :

data length [3] is not a sub-multiple or multiple of the number of rows [2]

>

> jointACEFit Running jointACE

Error: The expected means vector associated with the FIML objective in model 'MZ' is not of the same length as the 'dimnames' argument provided by the objective function. The 'dimnames' argument is of length 4 and the expected means vector has 2 columns.

Any help would be greatly appreciated.

Thanks a lot