adding covariates to ordinal model

3 replies [Last post]
cvanhulle's picture
Offline
Joined: 05/07/2010

I'm trying to add covariates to an ordinal ACE model. I want to include gender effects on the threshold, but I keep getting the following error: Error: In model 'univACEOrd' the thresholds in column 'clu2T1' of matrix/algebra 'MZ.expThreMZ2' are not in ascending order. The current order is: 'NA' and ascending order is: . Only the first 1 value(s) of this column are inspected.

I have no idea what that error means.
>

I'm letting the thresholds differ by zygosity. My script for MZ twins is

mxModel("MZ",
mxMatrix( type="Full", nrow=1, ncol=nv, free=TRUE, values=1.13, label="threMZ", name="T" ),
mxAlgebra( expression= cbind(T,T), dimnames=list('th1',selVars), name="expThreMZ1" ),
mxMatrix(type="Full", nrow=1, ncol=2, free=F, label=c("data.gender1","data.gender2"), name="MZDefVars"),
mxAlgebra(expression=expThreMZ1 + ACE.beta %*% MZDefVars, name="expThreMZ2"),
mxData( observed=mzData, type="raw" ),
mxFIMLObjective( covariance="ACE.expCovMZ", means="ACE.expMean", dimnames=selVars, thresholds="expThreMZ2" )
),

Neither beta from the ACE part of the model nor expThreMZ1 is null. Any advice would be greatly appreciated.

Thanks.

userzht's picture
Offline
Joined: 02/19/2011
similar work, different questions

My current work is similar to yours, adding the covariate to the ordinal model. I have two questions here.

1) When I run the model, there presents an error warning:

In model 'ACE_Cholesky' NPSOL 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)

##---------------------------------------------------------------
This happened when I added a covariate to the model. The model could be identified, since before I let the model read the data (just the variance of the covariate, i.e., the variances of the covariate were all zero but the manifest variables were read). I guess this is because it didn’t convergence. So I test my thought.
##---------------------------------------------------------------

After I made the variance to be smaller value, the software gave this:

##---------------------------------------------------------------
In model 'ACE_Cholesky' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN).
##---------------------------------------------------------------

I reran the model, and it didn’t work out. I want to ask how can I change the number of iteration and the convergence criterion. Or, are there better methods to handle this problem?

2) I tried to change the initial values of some parameters, for example, ‘a’, ‘c’, ‘e’, in order to make them more close to their ‘true’ value. I gave them different initial values, and the software gave me different evaluations. For example, the coefficient of covariate changed from positive to negative, and the absolute value was amplified ten times, although the path efficient of ‘a’, ‘c’, and ‘e’ didn’t change a lot. I hope somebody could explain this to me.

Thanks in advance!

neale's picture
Offline
Joined: 07/31/2009
Thresholds must increase

If two thresholds on the same dimension are equal, the proportion of the distribution that lies between them is zero. To say that a data point has zero likelihood is computationally toxic because its log-likelihood is negative infinity and numerically computers don't deal well with the infinite.

To fix, something like

mxMatrix( type="Full", nrow=1, ncol=nv, free=TRUE, values=(-6:6)/10, label="threMZ", name="T" ),

should do the trick. Previously they were all 1.13

That you didn't understand the error message is noted - we'll look for ways to clarify (perhaps include the first paragraph of this post?).

mspiegel's picture
Offline
Joined: 07/31/2009
The current documentation

The current documentation (http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Ordinal_Path.html) states the following:

Users of original or ‘’classic’’ Mx may recall specifying thresholds not in absolute terms, but as deviations. This method estimated the difference between each threshold for a variable and the previous one, which ensured that thresholds were in the correct order (i.e., that the second threshold for a variable was not lower than the first). While users may employ this method as it suits them, OpenMx does not require this technique. Simply specifying a thresholds matrix is typically sufficient to keep thresholds in proper order.

I don't think this is correct.