Output from mxFactorScores - Order of rows?
Posted on
rabil
Joined: 01/14/2010
Forums
In the help file for mxFactorScores, it says:
The rows are in the order of the _sorted_ data.
I'm not sure what this means. The data I have is in order by date and it's clear that the estimated factor scores for "ML" are no longer in the same order. There are two correlated factors each with 2 indicators (and nothing else). How can I get the factor scores into the same order as the rest of the data?
BTW, I'm using OpenMx 2.3.1 under R 3.2.2 (Ubuntu 15.04). mxFactorScores does not work with the RAM model so I converted it to LISREL in order to get the factor scores. (I had this problem before but I don't remember if it was ever resolved.)
mxFactorScores now in data-order (and supports RAM)
mxFactorScores
Just update to OpenMx 2.5.2
When first drafted, mxFactorScores returned scores in the order of the sorted data. However it now returns the scores in data-order, suitable for adding as columns to your data.
It also now supports RAM.
Log in or register to post comments
In reply to mxFactorScores now in data-order (and supports RAM) by tbates
Thanks. I upgraded to 2.5.2
> cal.fit <- mxRun(cal.model,intervals=TRUE)
Running cal_model with 13 parameters
> fscores.ml.omx <- mxFactorScores(cal.fit,type="ML")
Error in free[i, j] : subscript out of bounds
> fscores.wml.omx <- mxFactorScores(cal.fit,type="ML")
Error in free[i, j] : subscript out of bounds
type = "Regression" does work.
I've attached the code and generated a dataset that shows these errors (at least for me).
I changed back to RAM because the LISREL version caused to mxFactorScores to generate errors.
Log in or register to post comments
In reply to Thanks. I upgraded to 2.5.2 by rabil
Bug interaction with intervals
When I commented out the mxCI part of the model, everything worked fine. With the mxCI()'s in there, I got the same error as you. I'll work on a bug fix, but in the meantime making the model without the confidence intervals should fix it.
Log in or register to post comments
In reply to Bug interaction with intervals by mhunter
Fixed in next release
It will be fixed in the next release: http://openmx.psyc.virginia.edu/issue/2016/03/confidence-interval-reference-search-broken
Log in or register to post comments
In reply to Bug interaction with intervals by mhunter
Thanks. I commented out the
Log in or register to post comments