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.