You are here

Troubleshooting umxGXEbiv error

5 posts / 0 new
Last post
gdash's picture
Offline
Joined: 11/29/2021 - 17:56
Troubleshooting umxGXEbiv error

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!

lf-araujo's picture
Offline
Joined: 11/25/2020 - 13:24
Are you sure your data set

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.

gdash's picture
Offline
Joined: 11/29/2021 - 17:56
Data frame check

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)
AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
tibbles?

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.

gdash's picture
Offline
Joined: 11/29/2021 - 17:56
Thank you!

Thank you!