Higher-order factors, Matrix Specification
Posted on

Hi,
Is this possible to model higher-order factors using matrix specification instead of path specification in OpenMx?
regards,
Krzysiek
Is this possible to model higher-order factors using matrix specification instead of path specification in OpenMx?
regards,
Krzysiek
Yes
rF1 <- mxMatrix(..., name="F1") # First order factor loadings
rU1 <- mxMatrix(..., name="U1") # First order uniquenesses
rF2 <- mxMatrix(..., name="F2") # Second order factor loadings
rU2 <- mxMatrix(..., name="U2") # Second order uniquenesses
ru <- mxMatrix(..., name="u") # intercepts for manifest vars
rv <- mxMatrix(..., name="v") # means for second order latent vars
ecov <- mxAlgebra(F1 %*% (F2 %*% U2 %*% t(F2)) %*% t(F1) + U1 , name="expCov")
emean <- mxAlgebra(F1 %*% F2 %*% v + u, name="expMean")
expectation <- mxExpectationNormal(cov="expCov", means="expMeans")
Log in or register to post comments