At developers meeting on 7/22 we discussed the following:
<
ul>
- A monolithic coding style where everything is embedded within one call to the mxModel constructor. This style is featured on the homepage.
- A recursive coding style which makes lots of calls to the mxModel constructor.
- A piecemeal coding style which stores each piece of the model in a separate R variable and the constructs the mxModel using each piece/variable with a single concise call. This style tends to be favored for expert users and more complex models as it makes debugging the more straightforward than the other two styles.
- A brieft introduction to each coding style in the documentation.
- An indication in each demo and documentation example of what coding style is being used.
- The group discussed choosing one style (piecemeal) to use consistently throughout the demos. The goal would be to encourage users to create scripts using the style that facilitates the most straightforward debugging. Concern was raised that this decision may turn off novice users who are most comfortable with the monolithic coding style used in MPlus and Mx. Next week we will discuss the trunk/demos/LatentGrowthCurveModel_PathRaw.R model written in each of the three styles. Mike Hunter has volunteered to supply everyone with a copy of this demo written in the recursive and piecemeal coding style. It is currently written in the monolithic coding style in the source code repository.
- A bug was identified in the summary method of MxModel when an R objective function is used. The demo in trunk/demo/RObjectiveLISRELFactorRegression.R triggers the bug when line #334: summary(ex1Run) is uncommented. This bug is being looked into.
- Progress continues to be made on the implementation of a LISREL model type.
"A bug was identified in the summary method of MxModel when an R objective function is used." This has been fixed in the trunk and the next OpenMx 1.1 release.
"Mike Hunter has volunteered to supply everyone with a copy of this demo written in the recursive and piecemeal coding style."
I've added these demos to the repository as trunk/demos/LatentGrowthCurveModel_PathRaw_ModelRec.R and trunk/demos/LatentGrowthCurveModel_PathRaw_ObjectAdd.R.
The ModelRec file is in the recursive style. The ObjectAdd file is in the piecemeal style. The original file is in the monolithic style.
I changed the ModelRec style from:
into:
Those temporary variables did not serve a pedagogical purpose, unless we were saving them around to execute them, which we did not in this script.