Non Linear Modeling
Posted on

Forums
Dear all:
I am new to OpenMx. I have a question non-linear modeling in openMx. I have been trying to utilize a framework that observed measurement variables determine latent variable, and latent variables impact observed outcome variable. The thing is that the way latent variables impact outcome variable is non linear. Is there a way to modify the mxPath command to allow nonlinear estimations?
Thanks!
-Lin
Yes. The trick is to create
Yes. The trick is to create an mxAlgebra that evaluates the nonlinear function and results in a 1x1 matrix. Then give the name of the mxAlgebra as the label for the chosen mxPath.
Log in or register to post comments
In reply to Yes. The trick is to create by Steve
Thanks!
Thanks!
Log in or register to post comments
In reply to Thanks! by linx
Thanks
nice..
Log in or register to post comments
In reply to Yes. The trick is to create by Steve
Hi Steve, I added an
Hi Steve,
I added an mxAlgebra to a simple x->y model, calculating x^2
With the path free, I get
Error: In model 'play' the following are both named entities and free parameters: 'nonlin'
But fixing the path, I get
Error: In model 'play' the following are both named entities and fixed parameters: 'nonlin'
Catch 22? Or is a constraint needed, rather than matching labels?
Model code
Log in or register to post comments
In reply to Hi Steve, I added an by tbates
Oops. Steve's advice is
Oops. Steve's advice is slightly outdated. We changed the rule so that free and fixed parameters would not be confused with matrices and algebras. You need to use square-brackets, like so:
Log in or register to post comments
In reply to Oops. Steve's advice is by mspiegel
Thanks Mike: Very
Thanks Mike: Very clear.
Would be helpful to update the error message from the existing one to:
Error: In model ''. '' is used in both a named entity (mxAlgebra) and a parameter label.
Or to be super-duper helpful, add. "If you want to fix a path to the value of an mxAlgebra, refer to the Algebra with square-bracket notation: i.,e, instead of
labels="nonlin"
use
labels="nonlin[1,1]"
Log in or register to post comments
In reply to Thanks Mike: Very by tbates
I like the super-duper
I like the super-duper helpful error message! My philosophy with error messages is that they should be somewhat similar to the steel barriers in the middle of highways. These are designed a) to stop the vehicle going, e.g., across the central reservation into oncoming traffic (like a bad software error) and b) to guide the vehicle back onto its likely intended path.
Log in or register to post comments
In reply to Hi Steve, I added an by tbates
tbates, Thansk for
tbates, Thansk for Information
Log in or register to post comments