I thought this might be useful for those new to OpenMx (like myself) who are trying out the matrix specifications way of specifying latent growth curves. I ran into a bug when declaring a lgc model where the input method was 'cov' rather than 'raw', and since I couldn't figure out how to fix it directly I composed a step around way to do it. I believe that this issue is well known since the links from the current OpenMx Users Manual for
are not functioning, so in the meantime this way should suffice. What I did was compose a function that, given a cov matrix, a means vector, and sample size, returns an arbitrary raw data matrix that perfectly reproduces the declared moments. That way instead of having to state that the input='cov' users could just stay with the input='raw' way that is currently stable and functioning.
I have attached a revised demo file (from LatentGrowthModel_MatrixRaw.R in the manual) to demonstrate the problem and my solution. Love the OpenMx program so far, hope it continues to grow. Cheers!
|LatentGrowthCurveModel_MatrixRaw (revised).R||9.4 KB|