Hello,

I am currently running a cmlmt code and everything seems to be fine except that in the output it says that "the covariance of the parameters failed to invert". As a result I don't get a covariance matrix and don't get standard errors of my estimation. Moreover, my parameter "estimation" only returns the initial values of my parameters. It does not seem like there has been work done at all.

Could you tell me the reasons for this? Is it possible that this occurs if I am using dummy variables in my DS structure? Is there another way to include the dummy variables?

Best regards,

Lever

## 3 Answers

0

It appears to me that the problem is that your log-likelihood failed at your initial start values, and not the failure of the covariance matrix of the parameters. Use the debugger to look into your likelihood calculation to see where it fails. I would be happy to look at it if you would post a .zip file containing your command file and any data files required to run it.

0

Hi Ron,

I tried modifying the initial start values - it still does not return a complete output. Of course I can post it here, I just don't know how to attach it here. Can I mail it to you or something?

Kind regards,

Lever

0

I put a breakpoint on the calculation of the likelihood function, line 98 in the file I'm looking at. I ran it in the debugger to the breakpoint and then examined the variable (Examine Variable in the Debug drop down menu). I saw a number of infinities in the matrix which would explain why the initial calculation of the function failed. I then examined the R matrix which is involved in the calculation and saw that there were very large number in those elements of the matrix associated with the infinities in mm.function. Those elements were in the order of 2e7, which is very large. This number is squared and then exponentiated, i.e. you are computed exp(2e14), which on a computer is an infinity. It is very important to scale numbers used in computation. Any time very large numbers are mixed with small numbers, you will get catastrophic failures of precision. You need to scale those numbers in the R, X, etc. matrices that are on the order of 2e7.

## Your Answer

## 3 Answers

It appears to me that the problem is that your log-likelihood failed at your initial start values, and not the failure of the covariance matrix of the parameters. Use the debugger to look into your likelihood calculation to see where it fails. I would be happy to look at it if you would post a .zip file containing your command file and any data files required to run it.

Hi Ron,

I tried modifying the initial start values - it still does not return a complete output. Of course I can post it here, I just don't know how to attach it here. Can I mail it to you or something?

Kind regards,

Lever

I put a breakpoint on the calculation of the likelihood function, line 98 in the file I'm looking at. I ran it in the debugger to the breakpoint and then examined the variable (Examine Variable in the Debug drop down menu). I saw a number of infinities in the matrix which would explain why the initial calculation of the function failed. I then examined the R matrix which is involved in the calculation and saw that there were very large number in those elements of the matrix associated with the infinities in mm.function. Those elements were in the order of 2e7, which is very large. This number is squared and then exponentiated, i.e. you are computed exp(2e14), which on a computer is an infinity. It is very important to scale numbers used in computation. Any time very large numbers are mixed with small numbers, you will get catastrophic failures of precision. You need to scale those numbers in the R, X, etc. matrices that are on the order of 2e7.