Dear all,
I have a large matrix (A), and I want to constrain certain submatrices within A to (let's say the product of) some smaller matrices. How can this be done in OpenMx?
I am looking for something like:
A <- mxMatrix("Full", 4, 4, labels = c("a","b",NA,NA,"c","d",NA,NA,NA,NA,"a","b",NA,NA,"c","d"), byrow = TRUE, free = TRUE, name = "AA")
B <- mxMatrix("Full", 2, 2, labels = c("w","x","y","z"), byrow = TRUE, free = TRUE, name = "BB")
C <- mxMatrix("Full", 2, 2, labels = c("w1","x1","y1","z1"), byrow = TRUE, free = TRUE, name = "CC")
mxConstraint(A[1:2,1:2] == B%%C)
mxConstraint(A[3:4,3:4] == B%%C)
OR
mxConstraint(AA[1:2,1:2] == BB%%CC)
mxConstraint(AA[3:4,3:4] == BB%%CC)
Part of the problem appears to be that I am mixing up R and openMx Code.
Thank you very much for your help!