OpenMx/OpenMx

Fix `mxFactorScores()` for RAM-specified Matrix Models

mhunter1 opened this issue · 0 comments

This forum post https://openmx.ssri.psu.edu/node/4871 notes that mxFactorScores() gives the following error message when applied to a RAM matrix model:

Error: In model 'FactorScoresLinearGrowthCurveModelMatrixSpecification' the name 'fscore' is used as a free parameter in 'FactorScoresLinearGrowthCurveModelMatrixSpecification.Score' but as a fixed parameter in 'FactorScoresLinearGrowthCurveModelMatrixSpecification.Score'

The problem is unique to RAM matrix specification. Path specification models work fine. LISREL matrix specification works fine.

My guess is mxFactorScores() is getting confused about latent versus manifest variables. It's probably something to do with dimnames. See this file: R/MxFactorScores.R, and this test script demo/LatentGrowthCurveModel_MatrixRaw.R