Attachment | Size |
---|---|
Screen Shot 2018-04-13 at 2.35.08 PM.png | 95.67 KB |
Hi everyone,
I would like to conduct BLRT test for 2 nested GMM model with definition variables. I referred to a previous post
https://openmx.ssri.psu.edu/node/4329 and it worked well on my computer. However, when I run the comparison of my model, it reported errors. I attached a screenshot of LRT without and with bootstrap in the attachment. And here is the information of my OpenMx Version:
> mxVersion()
OpenMx version: 2.9.6 [GIT v2.9.6]
R version: R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0
MacOS: 10.13.4
Default optimiser: CSOLNP
NPSOL-enabled?: Yes
OpenMP-enabled?: Yes
Thanks in advance!
You should post your current script.
Thanks for kind and prompt reply. I've attached dataset and codes I am using. Thanks in advance!
I reproduce the error you report. I think this is a bug. A model using an MxExpectationMixture will run if the mixture components contain definition variables but the data are in the container model, and not the mixture-component. But,
mxGenerateData()
raises an error if it sees definition variables inside an MxModel object that doesn't contain an MxData object.The bug-fix will seemingly require modifying the behavior of
mxGenerateData()
when used with models that have MxExpectationMixture.As a workaround, try putting the MxData object inside the mixture components
class1
,class2
, andclass3
, and see it that makes a difference. Alternately, you could try definingsloLoads
differently, so that its labels arepaste0("GMM2Class.data.T", 1:10)
when used with the two-component model, andpaste0("GMM3Class.data.T", 1:10)
when used with the three-component model.Thanks for your kind advice. I've tried to put the raw data in each class. However, every time I tried run it, R studio would be terminated since "R encountered a fatal error" and I don't know why. Also, relabeling the definition variables did not work either. I've included the updated version with data in the attachment. Thank you.
BTW, it seems that the function mxBootstrap() does not work well if I put mxData outside the class1, class2 and class3. But it works if I put the data in each class. Thanks.
Yes, these are symptoms of the same problem with mxGenerateData.
Wait, I don't think that's the case.
mxBootstrap()
is for nonparametric bootstrapping, so its behavior doesn't depend uponmxGenerateData()
.What exactly is going wrong with mxBootstrap?
Something is going wrong with data generation.
Yeah, you can probably get your stuff to work with the current version of OpenMx by copying the data into the class components. Anyway, fixed in v2.9.6-48-g17adc932f
Tried it, but R studio would be terminated every time. And glad to know it will be fixed. May I know when v2.9.6-48-g17adc932f will be available (approximated date is good enough)? Thank you very much!
You could try the builds here
Specifically, you could try downloading this MacOS package binary and installing it.
Thanks for your kind reply. I tried, however, it seems not available for R version 3.4.4. I am wondering if it has specific requirement for r version. Thank you very much!
Not that I know of. But, I'm not involved in building OpenMx for MacOS. Are you downloading the file and installing the package from that local file?
Yep, and here is the screenshot
You might need to additionally pass argument
repos=NULL
toinstall.packages()
to install a local file.You use RStudio, right? It's also possible to install a local file with RStudio's package-installation interface.
Also, the extension of a MacOS package binary should be .tgz, not .tar.
Yes, it works now. Thank you very much!
I run mxCompare(model1, model2, boot=TRUE) on my computer using 4 cores overnight, but it did not work... I mean I did not get any result until now... Should it take longer? If so, I may want to run it on cluster. May I know how to upgrade the package on cluster? Thank you very much!
Who manages your cluster? You'll probably want to talk to that person for guidance.
Thanks for your kind advice! I firstly may want to check if the BLRT for definition variables is available for linux system. If so, which version should be used? Thank you very much!
What's implemented is data generation assuming that def vars are fixed. If that's what you want then it should work. You can test whether data generation works the way you expect with mxGenerateData
I agree with Joshua: the best person to ask is your cluster's sysadmin. If I had to guess, I would recommend following the instructions under "Unix installation" here, except with an additional shell command:
Yes, I think so