tbates / umx

Making Structural Equation Modeling (SEM) in R quick & powerful
https://tbates.github.io/
44 stars 17 forks source link

no slot of name "runstate" for this object of class "MxModel" error in Jupyter lab #198

Closed arinbasu closed 2 years ago

arinbasu commented 2 years ago

Hi Tim, I ran the following umxACE model in a Jupyter lab

data(twinData)
selDVs = c("bmi")
dz = twinData[twinData$zygosity == "DZFF",]
mz = twinData[twinData$zygosity == "MZFF",]
m1 = umxACE(
    selDVs = selDVs,
    dzData = dz,
    mzData = mz,
    sep = ""
    )
summary(m1)

This produced the following error: Error in slot(value, what): no slot of name "runstate" for this object of class "MxModel"

mcneale commented 2 years ago

It's because the model has not yet been run. This garbled error message is being rewritten. So it should work if you do summary(mxRun(m1)) instead.

RMKirkpatrick commented 2 years ago

You may need to update umx. The 'runstate' slot was eliminated from the MxModel class definition in OpenMx v2.20.

RMKirkpatrick commented 2 years ago

It's because the model has not yet been run.

That's not why. umx's on-load default behavior is to automatically run a umx model after it's created.

mcneale commented 2 years ago

I stand corrected. Those automagic things have a way of catching people out.

arinbasu commented 2 years ago

Thanks Rob and Mike. I uninstalled umx and reinstalled it with devtools::install_github("tbates/umx") With the current version of OpenMx (2.20.6.6), the problem is now resolved. Thank you again for your fast solution. I will close this issue now.

RMKirkpatrick commented 2 years ago

Glad to help.