Hi All,
Is there already a helper function to allow users to easily extract the model-implied covariance matrix for the latent variables in a RAM-type model? If not, then I created one (attached). If there was already one, then I've duplicated it under possibly different implementation.
If this is useful to many people, then it could be incorporated into OpenMx at some point.
Silly latent attachments.
Nice.
You might wish to use mxEval to obtain the A and S matrix so that you aren't directly accessing what is inside a slot. Granted, this has a bit more overhead, but it is negligible in comparison with being a bit more future proof.
I would also consider how to exit from the function if type!="RAM".