Copyright © 2007-2024 The OpenMx Project
Documentation helper gives an error
Running AlgebraExample
Error in mxRun(modelD) :
MxAlgebraObjective's objective algebra does not evaluate to a 1x1 matrix.
I'd suggest this:
A <- mxMatrix("Full", nrow = 3, ncol = 3, values=2, name = "A")
B <- mxAlgebra(A, name = "B")
C <- mxAlgebra(A + B, name = "C")
D <- mxAlgebra(sin(C), name = "D")
A <- mxMatrix("Full", nrow = 3, ncol = 3, values=2, name = "A")
model <- mxModel("AlgebraExample", A, B, C, D )
fit <- mxRun(model)
mxEval(D, fit)