Somehow, even with all the parameters fixed, I cannot escape from a region where OpenMx thinks the ordinal FIML is infinite. As far as I know, the likelihood should not be infinite for these particular parameter values.
Attachment | Size |
---|---|
mddndzf.txt | 3.34 KB |
BivariateTwinAnalysisOrdinal_MatrixRaw.R | 4.42 KB |
#1
mzfData <- read.table("mddndzf.txt", ...)
dzfData <- read.table("mddndzf.txt", ...)
Log in or register to post comments
#2
Log in or register to post comments
#3
By OpenMx's official specification, any non-threshold values in the threshold matrix must be NA. The Mx1 way of constructing thresholds by building a deviation matrix and multiplying by a lower triangular matrix of ones clashes with this if variables with different numbers of thresholds are included.
I'm attaching an updated version of the code that separates variables by the number of thresholds, handles each calculation separately, and then combines the matrices together again into a single threshold matrix. This requires one new matrix and one new algebra.
Log in or register to post comments
#4
When a threshold matrix for ordinal FIML is improperly specified, OpenMx should either correct the misspecification or throw an error. An example of a misspecification that does not throw an error is included in the original issue post.
Log in or register to post comments
#5
Log in or register to post comments
#6
I am wondering if we need a helper function or similar to construct these matrices automatically for standard cases.
I'd not caught the deal with NA's. In essence this lets openmx know how many categories there can be in the data, right? So some cross-checking, such that an error is generated if there's a data point outside the range of thresholds (e.g. a datapoint with 100 when there are only 10 thresholds) would be handy. Presently such errors fail with
Error in mxRun(BivariateOrdinalACEModel) :
Requested improper value (12, 0) from (12, 4) matrix.
But that is not very helpful. Ideally, the contents of the data vector that caused the error and which vector that was (position, rownumber) in the dataframe would come back with a bit more information. In my case, I tried a datavector with 19 1 7 0, instead of a legal one 9 1 7 0, but there is no hint of 19 in the improper value error message (I would have thought 19,1 rather than 12,0).
Simpler is the case where we know that a dataset does not include all of the values up to a particular maximum. At most this should generate a warning, not an error. There are times when we wish to fit models of this type to single data vectors (estimating ML factor scores).
Log in or register to post comments
#7
Log in or register to post comments
#8
Log in or register to post comments
#9
Log in or register to post comments