You are here

Interpreting Output from mxTryHardOrdinal

3 posts / 0 new
Last post
rabil's picture
Offline
Joined: 01/14/2010 - 16:47
Interpreting Output from mxTryHardOrdinal

The output below says a solution was found, but was it?

Begin fit attempt 21 of at maximum 21 tries
Error : In model 'Common Factor Model Path Specification' the thresholds in column 'v1' of matrix/algebra 'Thresholds' are not in ascending order. The current order is: '-1.00388149333709', '-0.30996599783707', '-0.0122212609134608', '0.402732054954498', '0.811483016461824', '1.19349018174458', '1.85261625163479', '2.72802947041772', and '2.44534528147363' and ascending order is: '-1.00388149333709', '-0.30996599783707', '-0.0122212609134608', '0.402732054954498', '0.811483016461824', '1.19349018174458', '1.85261625163479', '2.44534528147363', and '2.72802947041772' . Only the first 9 element(s) of this column are inspected.

Fit attempt generated errors

Retry limit reached

Solution found

Running final fit, for Hessian and/or standard errors and/or confidence intervals

Start values from best fit:

etc.

neale's picture
Offline
Joined: 07/31/2009 - 15:14
I somewhat suspect not.

Basically the thresholds should be constrained to be in order. One way to do this is to reparameterize so that the first threshold is unbounded, and the successive parameters are deviations from the previous thresholds AND they are bounded to be greater than zero. Premultiplying this matrix by a lower triangular matrix with 1's in it will give ordered thresholds. Like this:

    mxMatrix("Full", name="thresholdDeviations", nrow=nThresholds, ncol=nVariables, 
                   values=.2, free = TRUE, 
                   lbound = rep( c(-Inf,rep(.01,(nThresholds-1))) , nVariables),
                   dimnames = list(c(), fruitynames)),
    mxMatrix("Lower",nThresholds,nThresholds,values=1,free=F,name="unitLower"),
    mxAlgebra(unitLower %*% thresholdDeviations, name="thresholdMatrix"),
AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
Maybe, maybe not.

Maybe, maybe not. Bear in mind that mxTryHardOrdinal(), by default, uses exhaustive=TRUE, meaning that it runs for all of the extra tries, and returns the best result it found.

Edit: to clarify, due to the use of exhaustive=TRUE, it does not necessarily mean that mxTryHardOrdinal() failed to find a solution merely because its final fit attempt ended in error.

Did mxTryHardOrdinal() return an object of class "try-error"? If so, then every fit attempt resulted in errors. If it returned an MxModel, then it found a solution; you can assess the solution's quality by looking at myFittedModel$output$status$code, and looking for a warning message included in summary() output. Even if you get a status code of 5 or 6, the solution might still be OK, since it's the best solution found after 21 attempts at fitting the model.