Help deal with an error message: "1:(rsum * csum) : NA/NaN argument"

Posted on
No user picture. wang2022 Joined: 11/26/2022
Forums
Dear Dr. Cheung and Colleague,

I hope everyone is staying safe and having a wonderful holiday season!

We are currently conducting an metaSEM with a massive dataset: 1008 studies/matrices with 12 variables. Admittedly, there are quite many missing values in the dataset. However, we make sure that each cell has at least 10 data points from the primary studies (see “study counts5” in the attachment).

Because the dataset was too large, it took over 5 hours on my computer with a latest i9 processor to complete the stage1random estimation. Unfortunately, when I checked the output, it gave me nothing but an error message saying that the column and/or raw sum was NA.

We don’t know how to solve the estimation error, as there seemed no errors in the code. We would greatly appreciate it if you or any colleague could kindly advise how to deal with it. I have attached the cordata and sample size files as well as the code.

Thank you very much for your time and help! Happy holidays!

Replied on Fri, 12/16/2022 - 22:49
Picture of user. Mike Cheung Joined: 10/08/2009

Hi Wei,

The problem is related to the data being too sparse, which returns an error in the homogeneity test. The following command should work.

summary1 <- summary.meta(stage1random, homoStat = FALSE)

BTW, you can speed up the analysis by using multicores. It took about half an hour on my computer.

mxOption(key='Number of Threads', value=parallel::detectCores())

Replied on Tue, 12/20/2022 - 21:12
No user picture. wang2022 Joined: 11/26/2022

In reply to by Mike Cheung

Hi Mike,

Thank you so much for your prompt response and help! I tried the summary.meta function and it worked very well on my end. Thanks again!

However, the mxOption() function didn't seem to work so well. It did help speed up, yet it still took about 3 hours (vs. 5 hours without using the multicore functionality). I'm wondering if it is any way for us to speed up further. We are considering to rerun the stage1random to get better convergence. BTW, we were using a computer with an Intel 12th (the latest) i9 processor. It would be great if the computer can ran one cycle within 30 minutes.

Thanks for your time!

Replied on Wed, 12/28/2022 - 20:11
Picture of user. Mike Cheung Joined: 10/08/2009

Apart from using the multicore function, another way is to try the Microsoft R (https://mran.microsoft.com/open). Some users have reported that it speeds up the analysis.