Copyright © 2007-2024 The OpenMx Project
Hi,
the example for mxConstraint currently does not demonstrate a constraint in action. Trying to make a minimal model that shows the constraint working, I tried this, but it does not leave K>Z, as desired. If someone can point out the change needed to get a minimal constraint model working, I'll push up some new R help.
constraint <- mxConstraint('A', '=', 'B', name = 'constraint')
K <- mxMatrix(type="Full", nrow=2, ncol=2, free=TRUE, name="K")
Z <- mxMatrix(type="Full", nrow=2, ncol=2, free=FALSE,name="Z", values=1:4)
KbiggerthanZ <- mxConstraint("K", ">", "Z")
model<- mxModel("con_test", KbiggerthanZ, K,Z)
fit <- mxRun(model)
mxEval(K, fit)
[,1] [,2]
[1,] 0 0
[2,] 0 0