3

I have a problem when trying to calculate standard errors of estimates from fminunc. My estimation technique is Maximum likelihood Estimation. I've tried two ways as below, both failed:

  1. The Hessian matrix from fminunc results is non-invertible, so I can't get standard error from the Hessian matrix.

  2. So I turned to get standard errors using OPG(outer-product-of-gradient) method. However, the gradient I provided failed to pass derivative-check.

Does anybody know whether there are other ways that I can get standard error? Your help will be appreciated!

Amir
  • 10,600
  • 9
  • 48
  • 75
user2595696
  • 31
  • 1
  • 2

2 Answers2

0

This may be useful: http://gking.harvard.edu/files/gking/files/help.pdf

I've skimmed and my sense is you can't get a variance matrix from a non-invertible hessian matrix. It doesn't exist. The reference above says the standard response is:
a) get more data or
b) use a less complicated model.
But it also offers some rescue methods if neither of those is an option. I haven't gotten my head around their methods, so sorry this is incomplete.

Ilya
  • 29,135
  • 19
  • 110
  • 158
0

The link mentioned above references the use of the BHHH algorithm, which approximates the Hessian using the outer product of the scores. This has the virtue of always being invertible but the drawback of only working for a well-specified model, close to the truth and asymptotically (which it sounds like you may have concerns about).

To use this algorithm, you need to have the vector of likelihood contributions, call it grad (which is N by K, where N = #observations and K = #parameters). Then your standard errors are

se = sqrt(diag(grad'*grad))*N; % should be K by K 

Test them using a comparison with OLS or something where you have a closed form.

Superpronker
  • 309
  • 4
  • 10