# adding covariates to ordinal model

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.

## Thresholds must increase

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?).

Log in or register to post comments

In reply to Thresholds must increase by neale

## The current documentation

I don't think this is correct.

Log in or register to post comments

## similar work, different questions

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!

Log in or register to post comments