# Output from mxFactorScores - Order of rows?

6 posts / 0 new
Offline
Joined: 01/14/2010 - 16:47
Output from mxFactorScores - Order of rows?

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.)

Offline
Joined: 07/31/2009 - 14:25
mxFactorScores now in data-order (and supports RAM)

Hi: That's an old candidate implementation of 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.

Offline
Joined: 01/14/2010 - 16:47

Thanks. I upgraded to 2.5.2 and I changed the model back to RAM and I still get the same errors:

> 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.

Offline
Joined: 07/31/2009 - 15:26
Bug interaction with intervals

Sorry about this! Apparently, there's a bug in ML/WML factor scores that does not like models with confidence 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.

Offline
Joined: 07/31/2009 - 15:26
Fixed in next release

Here's the issue.

It will be fixed in the next release: http://openmx.psyc.virginia.edu/issue/2016/03/confidence-interval-reference-search-broken

Offline
Joined: 01/14/2010 - 16:47
Thanks. I commented out the

Thanks. I commented out the mxCI argument and it works.