tbates / umx

Making Structural Equation Modeling (SEM) in R quick & powerful
https://tbates.github.io/
44 stars 17 forks source link

make a function to rename models so they can be included in a super model #157

Closed tbates closed 3 years ago

tbates commented 3 years ago

A common task is seeing if a model fits more than one dataset - e.g. for replication, or generalisability, or meta-analysis.

umxSuperModel can combine groups (at least when #156 is closed), but the groups have the same model names, then the model won't run. SO... need to trundle over the 2nd through nth models suffixing their model names with n...

mcneale commented 3 years ago

It is the most attractive function name in the package! All models are hot, some models are super hot...

tbates commented 3 years ago

umxModelNames added

tbates commented 3 years ago

umxSuperModel looks like a RAM model to plot(m1), so a super model containing, say twin models in two data sets returns an error when plotting: Error in eval(result, envir = env) : object 'S' not found

Be nice to allow plot to detect RAM models which are just containers, and then plot the contents of non-RAM models, as it does now for multi-group RAM.

tbates commented 3 years ago

mxRefModels can't handle WLS or twin models. Be nice to code around that for supermodels which contain twin models... would allow umxSummary to work for these also.