If you update and change the name of a supermodel, references in submodels now point to the wrong object.
It would be nice if there was a keyword for "parent" or "container", so that instead of this, which needs manual maintenance when the parent name changes.
mxModel("twinACE", mxModel("MZ", mxData(mzfData, type="raw"), mxFIMLObjective("twinACE.expCovMZ", "twinACE.expMeanMZ")),
This would work:
mxModel("twinAE", mxModel("MZ", mxData(mzfData, type="raw"), mxFIMLObjective("parent.expCovMZ", "parent.expMeanMZ")),
I guess an alternative coding system would be to say
superName = "twinAE"; mxModel(superName, mxModel("MZ", mxData(mzfData, type="raw"), mxFIMLObjective(paste (superName, ".expCovMZ"), paste (superName, ".expMeanMZ")),
Makes code longer and harder to read though
Any pointers on how to handle this?