Dear Mike,
My name is B.I.Chung. I am writing a paper by MASEM analysis by using TSSEM procedure guided in your paper "Meta-analytic structural equation modeling". I sincerely appreciate all your explanation on the procedure of TSSEM in detail.
I prepared a correlation data for TSSEM from my previous meta-analysis and at the stage1 of Random-effects model, I am in trouble with below error message:
> stage1random <- tssem1(Cov=cordat, n=BI_MASEM_data_2$N, method="REM", RE.type="Diag")
Error in .Primitive("*")(dots[[1L]][[1L]], dots[[2L]][[1L]]) :
non-numeric argument to binary operator
I am a beginner of R program, so I don't know what the above error message means. Would you help me? I will appreciate it.
Best regards,
B.I.Chung
Dear B.I.Chung,
This error is not related to the metaSEM package.
If you check the output of head(cordat), you will notice that cordat are character matrices. The tssem1() function expects numeric data. You may need to convert the characters to numerics before the analyses.
Regards,
Mike
Dear Mike,
Thank you for your advise.
I converted the characters to numeric and run TSSEM1.
It seems to work, but I tried to get summary I had an error message as below.
Please, review the above error and provide me with your advise.
I will appreciate it.
Best regards,
Buil
Dear Mike,
I did rerun() and got the message as below.
Would you let me know how to fix this problem?
Thanks,
Buil
Dear Mike,
For your reference, data and script were attached.
Thanks,
Buil
Dear Buil,
For some correlation coefficients, there are only a few studies, e.g., 2 or 3. There may not be enough information for the meta-analysis.
Regards,
Mike
Dear Mike,
Following your advise, I added more data and run TSSEM1. It worked.
Thank you so much for your help.
I found the below wording at last paragraph:
OpenMx status1: 6 ("0" or "1": The optimization is considered fine.
Other values may indicate problems.)
The result of my data got "6". Would it be okay with "6" instead of "0" or "1"? Your feedback would be appreciated.
For your refernce, the script and the result are attached.
Best regards,
Buil
Dear Mike,
I run the stage2 and the below warning message appeared.
> stage2 <- tssem2(stage1random, Amatrix=A, Smatrix=S,
+ diag.constraints = TRUE, intervals.type = "LB")
Warning message:
In .solve(x = object$mx.fit@output$calculatedHessian, parameters = my.name) :
Error in solving the Hessian matrix. Generalized inverse is used. The standard errors may not be trustworthy.
What was wrong? How can I fix the problems? Thanks in advance for your help.
For your reference, the script and result of stage2 are attached.
Best regards,
Buil,
Dear Buil,
The detail of the error codes in OpenMx is listed at https://openmx.ssri.psu.edu/wiki/errors
I am afraid that I cannot run your code. Could you please include the correct data file, R code, and R output?
Regards,
Mike
Dear Mike,
Thank you for reply.
The data file, R code, and R output are attached.
I sincerely appreciate your help.
Thanks.
Buil
Dear Buil,
Thank you for providing more information.
The problem seems to be related to the stage 1 analysis. Since there are problems in the stage 1 analysis, you should not try the stage 2 analysis. It appears that you do not have enough data to estimate all the elements in the stage 1 analysis. You may need to simplify the model a bit.
Regards,
Mike
Dear Mike,
Thank you for your explanation. I understood that I'm now stuck in stage 1 analysis.
As per your advise, I simplified the model by reducing the number of variables from 8 to 6 and excluded 27 correlation coefficients indices which contain only 1 or 2 data from original 72 studies.
And I run the TSSEM stage1 with this modified data set but it failed again with OpenMx status1: 6.
I cannot estimate what's wrong. And I really need your help. Please, advise me how I can continue my analysis.
I attached the modified data, R code, and R output for your reference.
Best regards,
Buil
Dear Buil,
The following ad-hoc fix may work.
Regards,
Mike
Dear Mike,
Thank you so much for your great support. The ad-hoc code worked very well although some NAs were still on the output which might be associated with my data. Thanks a lot for your help and really appreciate your time and consideration.
Best regards,
Buil