Troubleshooting umxGXEbiv error

Posted on
No user picture. gdash Joined: 11/29/2021
Forums
Hello,
I am trying to run a bivariate moderation model with a continuous moderator that varies across co-twins (which I am very new to!). When I try to run the model, I receive the following error (using Tryhard also throws errors):

"Error incurred trying to run model: model = mxTryHard(model) might help?
assignment of an object of class “list” is not valid for @‘values’ in an object of class “FullMatrix”; is(value, "matrix") is not TRUE"

Might you be able to advise on the source of this error and how to remedy?

Here is the code I am using:


selDVs = "dv"
selDefs = "moderator"
mzData = subset(tmp, mzdz == "0")
dzData = subset(tmp, mzdz == "1")

model = umxGxEbiv(selDVs = selDVs, selDefs = selDefs,
dzData = dzData, mzData = mzData,
sep = "_T", dropMissingDef = TRUE)

Thank you very much for your help!

Replied on Fri, 09/16/2022 - 09:23
No user picture. lf-araujo Joined: 11/25/2020

Are you sure your data set (tmp) is of type data.frame? Seems like the subsetting part is generating a list, whereas mxData is expecting a data.frame or a matrix.

You can type str(mzData) or str(tmp) to check that.

Replied on Thu, 09/29/2022 - 15:35
No user picture. gdash Joined: 11/29/2021

Thank you for your reply! I believe it is a data.frame:


> is.data.frame(tmp)
[1] TRUE
> is.data.frame(mzData)
[1] TRUE
> is.data.frame(dzData)
[1] TRUE

Using str():

> str(tmp)
tibble [760 x 300] (S3: tbl_df/tbl/data.frame)

> str(mzData)
tibble [332 x 300] (S3: tbl_df/tbl/data.frame)

> str(dzData)
tibble [428 x 300] (S3: tbl_df/tbl/data.frame)

Replied on Thu, 09/29/2022 - 15:57
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by gdash

You may be encountering this bug, which has been patched in the master branch of the source repository, and will be repaired in the next stable release of OpenMx.