Attachment | Size |
---|---|

Cholesky_thresholds.R | 14.62 KB |

myFunctions.R | 3.44 KB |

Dear all,

I would like to fit a trivariate Cholesky model in OpenMx. I have data of twins aged 7, 10, and 12 years old with longitudinal data for a part of the sample. My data are skewed, so I made three categories and I would like to fit a threshold model on them. I fixed the thresholds to be equal across ages, so I estimate two thresholds in total. The means and the variances of the phenotype increase with age though, so I would like to fix the mean at time point 1 to zero and the variance to one and freely estimate the means and variances of the subsequent ages. There are also quantitative and qualitative sex differences. When I run the script that is attached to this posting, I keep getting the following warning message:

Running CholACE

Warning message:

In model 'CholACE' Optimizer returned a non-zero status code 6. 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)

I have changed the starting values many times and each time I get a different -2LL and totally different path estimates. I thought that there might be too few observations in some of the cells (especially for the longitudinal data), however the model does not run on simulated data either (see script).

There is no problem when I run univariate threshold models for each age separately.

Does anyone know what is going wrong here? Could it be that the variances need to be one for all ages?

Many thanks in advance!

Best regards

Charlotte

Hi Charlotte

I'm not sure what's going on, but there are a couple of things to try. One would be to use CSOLNP instead, it's a bit better with ordinal data. The other is to use my preferred trick for ordinal data, which is to fix the first two thresholds to zero and one. Then you can estimate means and variances, just the same as if fitting to continuous data.

CSOLNP does look better:

Dear Mike,

Many thanks for your quick reply! I have tried three things now:

1- Adding mxOption(NULL,"Default optimizer","CSOLNP") to the syntax.

2- Fixing the thresholds to -1 and 1 (increment of 2) and freely estimating the means and variances –> I chose -1 and 1 rather than 0 and 1 based on the simulation script.

3- Both 1- and 2- at the same time.

I got these results:

1- The gradient indeed looks much better. However, the estimates change dramatically when I change the starting values. Actually, the estimates equal the starting values apart from the ones that are related to the variance that I have fixed to one (a11, c11, e11). Standard errors are not included in the output (due to the statement fixing the variance of the first measurement to one, I guess).

2- It took very long for this model to converge. Many standard errors are not estimated (“NA”). The gradient doesn’t look good either (some >10). The estimates are not equal to the starting values this time. However, the estimates and the fit change even when the starting values stay the same.

3- For option 3, the gradient gets really, really bad (e.g., -14213.93885). The estimates are not on the starting values. Again, the estimates and the fit change even when the starting values stay the same.

For all three approached, I get a Mx status Red-warning.

I don’t know what it means, but I also get this:

[0] here in findMax

I have attached the three scripts. Any advice is very much appreciated!

Best regards

Charlotte

Dear all,

I am still stuck with this problem... Does anyone have a suggestion on what else I could try?

Best

Charlotte

Hi Charlotte

A couple of things:

I don't think that fixing the first two thresholds to -1 and 1 or 0 and 1 would make that much difference, except that where you start the mean and what the starting values generate as variance.

In my experience, starting parameters where the covariance matrix is diagonal (i.e. all E) can be a good strategy. It keeps things nicely positive definite and it is easy to ensure that there are no wild outliers (the likelihood is the product of the univariate likelihoods). It is always a good idea to choose reasonable starting values. Optimization isn't an exact science, so very poor starting values are likely to cause problems.

If you want SE's, it is necessary to eliminate the mxConstraint() statements. Or use bootstrapping. Eliminating mxConstraints can usually be done by fixing a diagonal E parameter or two to (e.g.) 1. Be careful to avoid bounds on parameters as well (this can interfere with things if you are working in unstandardized space).

Finally, I don't know what the Find warning message means, but will ask the optimizer coders.

The message "here in findMax" is mxLog output. I think it happens when CSOLNP encounters a non-finite fitfunction value.