jmbejara / comp-econ-sp19

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2019)
48 stars 26 forks source link

Optimizer not working but generating correct log-likelihood values #61

Closed IshaanW closed 5 years ago

IshaanW commented 5 years ago

My negative log-likelihood function is outputting the correct value for Q1 and when I input the correct theta, produces a value of 276.52 which is fairly close to the reported value in the paper of 263.09. However, my optimizer results are alternating between the initial guess theta0 and being completely incorrect. I'm not sure how to proceed with debugging. [I've added bounds for alphas which I believe are working correctly]

jmbejara commented 5 years ago

Your result is close, but there difference seems large enough that I would not be confident proceeding. I'm continue with Q1.

Also, note that the optimizer should take at least a few minutes to run. You can also test the optimizer by putting in a different initial value. For example, you can input the correct answer as the initial value and see if the optimizer succeeds at staying at the correct answer. We happen to know what the correct answer is because it's in the paper.