Reputation: 3608
In OpenMx 1, we could access the objective with
model@objective
In OpenMx 2, this slot is missing (as the objective now distinguishes explicitly between the expectation and the fit function). So, I guess we should be accessing the objective with
model$expectation
model$fitfunction
Or
model@expectation
model@fitfunction
Is that right?
Upvotes: 0
Views: 203
Reputation: 94277
The 2.0 release note says:
- Replacement of @ accessors with $ accessors in mxModel objects. You no longer have to keep track of when to use which; just always use $!
NOTE: Concerning the last bullet point, users should definitely get into the habit of ALWAYS using $ instead of @. For example, myModelRun@output$estimate would now be myModelRun$output$estimate. We CANNOT guarantee that every usage of the @ accessor that worked with versions 1.3/1.4 will continue to work in 2.0.
http://openmx.psyc.virginia.edu/2014/05/first-openmx-20-beta-released
Upvotes: 1
Reputation: 3608
Yes: in OpenMx 2 the correct thing to do is model$fitfunction
and model$expectation
In general, in OpenMx 2, avoid using @ to access any part of a model: Use $ instead. Helpfully, OpenMx 2 also enables tab-completion for easy discovery of model components.
Upvotes: 0