The name XXX appears more than once in the model
Posted on

Forums
I have just got this error message. What I have done is
1. define a model say, A, which includes sub-models.
2. define A0<-mxModel(A, name="A0")
3. add a suffix "0" to all parameters in A0, so that A and A0 are exactly the same but with independent parameters
4. define a bigger model M<-mxModel("M", A, A0, some constraints and objective function over A and A0)
When I ran it, OpenMx complains that the name of a submodel in A appears more than once. Do sub-sub-models need to have different names even though they are in different sub-models? If this is required, is there a better way to do 1-4 above without defining A0 from scratch?
Thanks a lot.
Hao
Yes, all named entities in a
Yes, all named entities in a model must have unique names. Take a look at the function
mxRename()
, it may be sufficient for your script.Log in or register to post comments
In reply to Yes, all named entities in a by mspiegel
rename multiple objects at one time?
Thanks, Mike. That helps.
Actually it turns out that I only need to rename some of the duplicated objects, but not all of them, for the model to run. Would this be normal or unexpected? Would it be possible to make mxRename() rename multiple objects at a time? Currently it can only rename a single object.
Thanks.
Log in or register to post comments