Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *kzhang*

Created *02/29/2012 - 07:44*

Wed, 02/29/2012 - 07:44 — kzhang [1]

Hello,

First, thanks for providing such a useful software package!

Second, I am having some trouble getting my model to finish running, and since I have to manually stop the script, I don't get any helpful output that would help me debug. Please find attached my script.

A brief description of what I'm trying to do, since some of the code is tricky (since I need many workarounds to deal with my data and model). I am feeding OpenMx a meta-analyzed correlation matrix (O), with each observed correlation being a correlation between psychological constructs at 2 time points. The objective function to be minimized is a least-squares approach. Matrix B contains 2 parameters I'm trying to estimate (a and e). I then want to take a and e, plug them into EFF, and use that to iteratively calculate the parameters of my gamma matrices. The parameters from these gamma matrices are then plugged into my PSI matrix. Both B and PSI go into the objective function to be minimized here.

I'm unsure what is causing my script to malfunction, but I wonder if the following have to do with it:

1) The circularity of my calculations. Using B to calculate PSI, and having both B and PSI go into the optimizer.

2) When I did some troubleshooting, sometimes it seemed as if the XI matrices were not being treated as matrices (but instead as some other type of object or data frame).

3) During troubleshooting, I also sometimes saw the error: Attempted to set improper value (1,3) to (3,2) matrix. What does this mean?

Thank you very much!

Best regards,

Anne

Attachment | Size |
---|---|

MatSpec022912full.R [2] | 32.86 KB |

**Links:**

[1] http://openmx.psyc.virginia.edu/users/kzhang

[2] http://openmx.psyc.virginia.edu/sites/default/files/MatSpec022912full.R

[3] http://openmx.psyc.virginia.edu/thread/1297

[4] http://openmx.psyc.virginia.edu/thread/1288

[5] http://openmx.psyc.virginia.edu/forums/openmx-help/openmx-general-help