The name XXX appears more than once in the model

Posted on
Picture of user. wuhao_osu Joined: 09/07/2010

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

Replied on Fri, 02/17/2012 - 12:36
Picture of user. wuhao_osu Joined: Sep 07, 2010

In reply to by mspiegel

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.