better error when running model?

I think users (and me :-) ) will often struggle with mxRun-time errors - they have that "oh its somewhere in the whole-thing" feel that makes it hard to start pinning them down).

So any clues (such as the name of the algebra causing an error, and or the sizes of the two matrices that were being cbind()ed ) would be gratefully received:

# generated by the rev 871 version of trunk/models/failing/NTF_design.R
fit <- mxRun(model)
# Error in mxRun(model) :
# Non-conformable matrices in horizontal concatenation.

traceback()

can mxPath error include the path?

got this error

Error: mxPath() call will generate 2 paths but you have specified 3 values

Would be very helpful if the error could include the mxPath as coded to help find the bad path, for instance in a list of possible bad paths like this:

Error: mxPath() call will generate 2 paths but you have specified 3 values:
	mxPath(from= c("x","y"),  arrows=2, free=TRUE, values=c(1, 1), labels=c("Varx","Vary"))
defModel<-mxModel("Def model", type="RAM",
	mxData(myData, type="raw"),
	manifestVars=c("x","y"),
	latentVars="DefDummy",

Documentation does not have clear breaks between sections

The html documentation of examples comes as one large gob of all the examples together, without demarcation of where each section begins and ends. It would be better if the sections were not all glued together in the html version, but if they have to be, then some

------------ End of Such-and-such Example -------------

is desired

code review for linear constraint specification

There are some odd lines of code that I would like to see better inline comments explaining what is going on. In npsol.c around lines 330 I see "// For memory allocation purposes, nlinwid > 0" and then again for nlnwid. I don't understand why nlinwid and nlnwid are assigned to 1 for non-positive values of nclin and ncnln. Also, a little further down on line 373, there's the line: for(; k < n+nclin; k++). Is this the correct thing to do if nclin is negative?

Definition variables not working correctly

By switching on debugging OMX_DEBUG and OMX_DEBUG_ROWS in omxFIMLObjective.c I could see the predicted covariance matrices being used to compute the likelihood. Now, what is interesting is that they are fine (i.e. they agree with oldMx) for the first two cycles through the 5 data vectors of the attached example. But the second two cycles differ and they are incorrect. The problem is set up with zero free parameters, so not many cycles are involved (and I'm not sure why there are 4 but perhaps some are for checking purposes). Here's an output snippet from one of the latter cycles:

working example for mxConstraint

Hi,
the example for mxConstraint currently does not demonstrate a constraint in action. Trying to make a minimal model that shows the constraint working, I tried this, but it does not leave K>Z, as desired. If someone can point out the change needed to get a minimal constraint model working, I'll push up some new R help.

# Constrain A to be equal to B
constraint <- mxConstraint('A', '=', 'B', name = 'constraint')

# Constrain a matrix of free parameters 'K' to be greater than Fixed matrix 'Z'

K <- mxMatrix(type="Full", nrow=2, ncol=2, free=TRUE, name="K")

mxConstraint error: reports Non-conformable subtraction, should own up :-)

Hi chaps,
I was incorporating mxConstraint() into a model today and getting the following error

mxRun(model)
Running common_path_constraint_ACE 
Error in mxRun(model) : Non-conformable matrices in Matrix Subtract.

The actual problem is that I was equating a 2*2 Identity to a 1*1 Full, so the error is misleading...

Would be nice if the error contained the matrix names (i.e., L and nFac_IMatrix) and mxConstraint rather than subtraction

Here's a fragment to show the usage...
share = mxModel("all",