Usually, one uses omxSetParameters() to change something about a model - say fix or free parameters, so that the revised model can be fitted and compared. It would be useful to be able to change the name at that point. The attached patch modifies omxSetParameters() to add at the end of the arglist newname = NULL and if the newname is not NULL it changes the model name.
Possibly, newModelName would be a better name for the new argument, from the disambiguation pov. That does, however, apply in other places... name = is also a possibility but would be even more ambiguous.
Attachment | Size |
---|---|
mxModelParameters.patch | 864 bytes |
#1
Uh, we already have a function to do this: mxRename().
Log in or register to post comments
#2
Yes, but that makes it a two-liner instead of a one-liner. Pretty much whenever one uses omxSetParameters one does so in order to fit a different model, and renaming helps later on.
From a didactic perspective, one command to effect all the necessary changes in a model seems easier to communicate.
Good to be reminded about mxRename() nonetheless; might simplify the proposed revision to omxSetParameters
Log in or register to post comments
#3
OK, the argument 'name=' has been added to omxSetParameters() in the svn trunk. I could include it in the stable-1.2 series, so it would be a part of OpenMx 1.2.1. That slightly goes against our policy of minor releases reserved for bug fixes (unless you count this missing feature as a bug), but OTOH the change is so small it should be OK.
Log in or register to post comments
#4
I think if we're doing this, it may as well go out now, to minimise the number of scripts that don't take advantage of halving the number of lines updating takes.
I wrote a wrapper just to do this, and it would be good to retire it :-)
Log in or register to post comments
#5
OK it's been ported to the 1.2 code base.
Log in or register to post comments
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
Log in or register to post comments