You are here

Converting ClassicMx script to OpenMx

2 posts / 0 new
Last post
amr438's picture
Offline
Joined: 03/09/2016 - 16:21
Converting ClassicMx script to OpenMx
AttachmentSize
Binary Data ECOT script_new3.R44.54 KB
Plain text icon ECOT_dis_parenting_ext_sibs.txt359.6 KB

Hello,

I am currently trying to recreate ClassicMx script for an ECOT model into OpenMx and I am coming across an error that I am not sure how to solve.
When I run the model I get the following error:

Error: The following error occurred while evaluating the subexpression 'solve(ecot.matF %% solve(ecot.matI - ecot.matA) %% ecot.matM %*% ecot.matU)' during the evaluation of 'MZtoss.expMeanMZtoss' in model 'modelECOT' : 'a' (4 x 1) must be square

I have attached the ClassicMX code and OpenMx code.

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
extraneous solve()

There is an extraneous solve() operation in the MxAlgebras that define the model-expected means. I think what you probably want to do is

t(ecot.matF%*%solve(ecot.matI-ecot.matA)%*%ecot.matM%*%ecot.matU)

, although I don't really understand what the 'U' matrix is supposed to do.