help: "Cov" is not positive definite.
Attachment | Size |
---|---|
codes.R | 2.23 KB |
Thank you for your awesome software. I have been working on a TSSEM and once I run my attached codes on the data in the excel file attached, I get the message below after the first stage regression is completed:
"Error in wls(Cov = pooledS, aCov = aCov, n = tssem1.obj$total.n, RAM = RAM, :
"aCov" is not positive definite.
In addition: 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."
I have thoroughly checked my codes and data for possible errors but still can not resolve it. Could you please have a look and point out what could be the issue, please?
As a second issue, with similar data structure and codings, I am tried to run the TSSEM for a group of 14 variables. Again after the first stage output, the iterations/estimations for the second stage has been running for days with no output. Is this a normal thing or perhaps an issue of the low processing power of my computer?
Best.
Not enough data perhaps?
Possibly, things would go better with ML and robust standard errors, but I am not familiar with the levels of measurement of your variables.
For the job that has been running for days, try a different optimizer. If you have NPSOL enabled, then switching to it is easy by putting this line after loading the OpenMx library:
mxOption(NULL, 'Default optimizer', 'NPSOL)
Log in or register to post comments
Hello Neale,
Thanks for your suggestions. They were indeed helpful. Is they a way of testing/running/assessing a mediation analysis using the TSSEM, please?
Regards.
Log in or register to post comments
As Michael has said, the main
> pattern.na(cordat, show.na = FALSE)
DUA BNKRISK BSIZE LEV AGE LIQ OWNCON INST PERF
DUA 46 21 18 17 7 5 2 1 34
BNKRISK 21 110 45 40 8 21 18 6 91
BSIZE 18 45 133 47 18 17 17 9 112
LEV 17 40 47 121 14 14 14 8 99
AGE 7 8 18 14 38 2 2 3 37
LIQ 5 21 17 14 2 51 10 2 42
OWNCON 2 18 17 14 2 10 43 1 35
INST 1 6 9 8 3 2 1 18 17
PERF 34 91 112 99 37 42 35 17 162
Regarding the mediation model, we may refer to the following pre-print. https://psyarxiv.com/df6jp/
Best,
Mike
Log in or register to post comments
In reply to As Michael has said, the main by Mike Cheung
Hello Mike,
Thank you very much for your suggestion. Really appreciated. I will give it a try.
Kindest Regards,
Kwabena
Log in or register to post comments