latent scores
Posted on

Attachment | Size |
---|---|
Rplot.jpeg | 125.44 KB |
Hi,
Does anyone know how to estimate latent scores in the following model?
What package should I use?
best regards,
Krzysztof
Does anyone know how to estimate latent scores in the following model?
What package should I use?
best regards,
Krzysztof
search the forums for factor scores
Just use `mxFactorScores` or the friendly umx wrapper function `umxFactorScores` to get scores for each subject on each latent factor in any RAM model!
Here is [another thread](http://openmx.psyc.virginia.edu/thread/1294) discusses factor scores and (old and not needed now) helper functions to do so:
Log in or register to post comments
In reply to search the forums for factor scores by mhunter
some doubts
My model includes four latent factors: two of them represent psychological content, the other two represent different forms of the items. Each of the items load on one of the two "content" factors and on one of the two "form" factors. This model is similar to the multitrait-multimethod model. I'm not sure if in the case of such a model I can calculate the factor scores using one of the methods typically applied for less complex models such as Bartlett, Thomson, or regression based factor scores.
Log in or register to post comments
In reply to some doubts by krzysiek
It's a factor model
If interested, you could also use maximum likelihood factor scores. A paper by Ryne Estabrook and Michael Neale gives plenty of details on doing this in OpenMx.
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3773873/
Log in or register to post comments
In reply to It's a factor model by mhunter
Thank you
Log in or register to post comments
In reply to Thank you by krzysiek
problems with ML estimation
In model 'Weighted Factor Score Model' NPSOL returned a non-zero status
code 1. The final iterate satisfies the optimality conditions to the
accuracy requested, but the sequence of iterates has not yet converged.
NPSOL was terminated because no further improvement could be made in the
merit function (Mx status GREEN).
Much worse was the case of two-factor model for which some data made the
weights implementation return error, like below:
Error: The job for model 'Weighted Factor Score Model' exited abnormally with the error message: Objective function returned a value of NaN at iteration 30.3.
In addition: Warning message:
In model 'Weighted Factor Score Model' NPSOL returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
The case of four-factor model (like the one I presented in my earlier post) was the worst. For all of my data I received the messages like this:
Error: The job for model 'Weighted Factor Score Model' exited abnormally with the error message: Objective function returned an infinite value at iteration 26.6.
How can I improve the performance of this code? I would be grateful for
any suggestions and information.
Log in or register to post comments
In reply to problems with ML estimation by krzysiek
Errors?
I am assuming that your problems arise in the estimation of the model, not of the factor scores, correct?
Log in or register to post comments
In reply to Errors? by neale
No, these problems arise in
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3773873/.
It seems that the more factors in the model, the more serious errorrs arise in the estimation of the maximum likelihood factor scores.
Log in or register to post comments
In reply to No, these problems arise in by krzysiek
ML vs posterior ML
The other piece is whether or not you use the latent covariance structure to get the posterior ML factor scores, a kind of empirical Bayes ML factor score. I found less sensitivity when using straight ML than in the posterior ML method.
Log in or register to post comments
In reply to ML vs posterior ML by mhunter
I did everything like you
In model 'Weighted Factor Score Model' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN).
Log in or register to post comments
In reply to I did everything like you by krzysiek
Yay!
"A value of 1 means that an optimal solution was found, but that the sequence of iterates did not converge. There are several reasons this can happen, including starting at the correct values. It generally does not indicate a problem. These estimates can generally be considered correct solutions, so this code is labeled (Mx status GREEN)."
http://openmx.psyc.virginia.edu/wiki/errors
Log in or register to post comments
In reply to I did everything like you by krzysiek
Glad you and Hunter were able
Ryne
Log in or register to post comments
In reply to Glad you and Hunter were able by Ryne
LISREL style to RAM weight algebra?
Can you share how to translate this weight algebra into RAM form from the LISREL-style? matrices used in Estabrook and Neale 2013?
mxAlgebra(name = "weight",
1 / (sqrt( 2 * pi) * sqrt(det(model.phi))) * exp(-.5 * (model.mu %&% solve(model.phi)))
)
Is phi the latent corner of S, and mu the latent columns in M?
PS: Is there a reference for the purpose of each matrix in the CFA implementation you and Mike used as an example?
Log in or register to post comments
In reply to some doubts by krzysiek
Missing or ordinal data?
Factor scores derived by ML from 0/1 type items are typically more precise, if the item responses are thought to derive from an underlying and normally distributed liability dimension.
Log in or register to post comments
In reply to Missing or ordinal data? by neale
no missings and ordinal data
Log in or register to post comments
In reply to no missings and ordinal data by krzysiek
Still better to use ML
Log in or register to post comments