Referencing Data in an Algebra for mxAlgebraObjective
Posted on

Forums
I'm trying to spec out a least-squares based optimizer using the mxAlgebraObjective, but I've been unable to include data in an algebra. Is that possible/feasible, or do I need to move to mxRObjective?
An mxAlgebraObjective only
myData <- matrix(....)
model <- mxModel(
mxMatrix(type="Full", nrow=nrow(myData), ncol = ncol(myData), free=FALSE, values=myData, name="theData")
)
and then just use "theData" in your objective algebra.
Is that what you're looking for?
Log in or register to post comments
In reply to An mxAlgebraObjective only by tbrick
Yeah Steve has some models
Log in or register to post comments
I guess I would recommend
The disadvantage is that it may take more time to code and certainly will estimate more slowly.
The advantage is that it may speed the translation of the objective function into a C function(s) in the backend.
My advice is predicated on the idea that WLS in the backend is your target.
Log in or register to post comments