#running an ordinal model...
fit = mxRun(model, intervals=F)
Running Full mv ordinal
Error: In model 'Full mv ordinal' the thresholds in column 'integration1' are not in sorted order.
fit = mxRun(model, intervals=F)
Running Full mv ordinal
Error: In model 'Full mv ordinal' the thresholds in column 'integration1' are not in sorted order.
Can this error be made more specific? Does it refer to (mxData as it seems to suggest)?* If so, in which group etc. Or if the thresholds matrix of the matrix pointed to by the "thresholds" parameter of an mxFIMLObjective of a model?
More info would help debugging. Esp to say what threshold was out of order (not even sure how this is possible given that the thresholds matrix is pre-multipled by a lowerOnes %*%... so scratching my head at present)
*Not the case, I think, as the data have had mxOrder applied
is.ordered(dzData$integration1)
[1] TRUE
#1
It is not sufficient to premultiply the matrix of thresholds with a lower triangular matrix of 1's. It is also necessary to ensure that thresholds 2 to maxthresh are lbounded to be strictly positive (say .01). Yet the error can still occur even when this is also specified. When? If the correlation matrix for integration is not positive definite. Hence the utility of informing the user of the correlation matrix used for integration. However, it is my experience that users are often find difficulty with using this information and require some guidance.
Log in or register to post comments
#2
Log in or register to post comments
#3
fit1 = mxRun(model1, intervals=F, unsafe=T)
Running Full mv ordinal
Error: In model 'Full mv ordinal' the thresholds in column 'meaningfulnesssociety1' of matrix/algebra 'top.thresholdsMatrix' are not in ascending order. The current order is: '-3', '-6', '-9', '-7.33333333333333', '-5.66666666666667', '-4', '-2.33333333333333', '-0.666666666666665', '1', and '2.66666666666667' and ascending order is: '-9', '-7.33333333333333', '-6', '-5.66666666666667', '-4', '-3', '-2.33333333333333', '-0.666666666666665', '1', and '2.66666666666667' . Only the first 10 value(s) of this column are inspected.
As confirmed looking inside top.thresholdsMatrix.
> mxEval(top.thresholdsMatrix, fit1)
meaningfulnesssociety1 integration1 religBeliefsSummed1 meaningfulnesssociety2 integration2 religBeliefsSummed2
th0 -3.000000 0.6666667 0.0001000 -3.000000 0.6666667 0.0001000
th1 -6.000000 1.3333333 0.0002000 -6.000000 1.3333333 0.0002000
th2 -9.000000 2.0000000 0.0003000 -9.000000 2.0000000 0.0003000
th3 -8.333333 2.6666667 0.8136373 -8.333333 2.6666667 0.8136373
But given that is just two of these side by side:
mxAlgebra(lowerOnes %*% baseAndIncrements, name="thresholds" )
And that baseAndIncrements knows that it has to contain positive steps (and does:
mxEval(top.baseAndIncrements, fit1)
[,1] [,2] [,3]
[1,] -3.0000000 0.6666667 0.0001000
[2,] -3.0000000 0.6666667 0.0001000
[3,] -3.0000000 0.6666667 0.0001000
[4,] 0.6666667 0.6666667 0.8133373
What gives?
Log in or register to post comments
#4
meaningfulnesssociety1 integration1 religBeliefsSummed1 meaningfulnesssociety2 integration2 religBeliefsSummed2
th0 -3.000000 0.6666667 0.0001000 -3.000000 0.6666667 0.0001000
th1 -6.000000 1.3333333 0.0002000 -6.000000 1.3333333 0.0002000
th2 -9.000000 2.0000000 0.0003000 -9.000000 2.0000000 0.0003000
th3 -8.333333 2.6666667 0.8136373 -8.333333 2.6666667 0.8136373
The increment matrix (if I understand top.baseAndIncrements correctly) has negative numbers in at least one of the elements top.baseAndIncrements[2:4,1:3]. Therefore I surmise that the top.baseAndIncrements needs lbounds for these elements and should be initialized to something like:
[,1] [,2] [,3]
[1,] -3.0000000 0.6666667 0.0001000
[2,] 1.0000000 0.6666667 0.5000
[3,] 1.0000000 0.6666667 0.5000
[4,] 0.6666667 0.6666667 0.8133373
Log in or register to post comments
#5
I HAD lbounds on fit1@submodels$top@matrices$baseAndIncrements... but forgot to switch the default fill from columns to rows first so...
@lbound
[,1] [,2] [,3]
[1,] -5e+00 1e-04 1e-04
[2,] -5e+00 1e-04 1e-04
[3,] -5e+00 1e-04 1e-04
[4,] 1e-04 1e-04 1e-04
@lbound
[,1] [,2] [,3]
[1,] -5e+00 -5e+00 -5e+00
[2,] 1e-04 1e-04 1e-04
[3,] 1e-04 1e-04 1e-04
[4,] 1e-04 1e-04 1e-04
[5,] 1e-04 1e-04 1e-04
[6,] 1e-04 1e-04 1e-04
[7,] 1e-04 1e-04 1e-04
[8,] 1e-04 1e-04 1e-04
[9,] 1e-04 1e-04 1e-04
[10,] 1e-04 1e-04 1e-04
Anyhow: The new message focuses attention nicely... Thanks Mike, and Michael :-)
Log in or register to post comments
#6
Log in or register to post comments
#7
> fit1 = mxRun(model1)
Running Full mv ordinal
Warning message:
The job for model 'Full mv ordinal' exited abnormally with the error message: Objective function returned a value of NaN.
Log in or register to post comments
#8
Log in or register to post comments
#9
t
The job for model 'Full mv ordinal' exited abnormally with the error message: Objective function returned a value of NaN.
Log in or register to post comments