Dear All
I am running below model on my dataset
However, it does not converges after 300 iteration. Value of log likelihood does not change from iteration 11 onwards.
I got below information from Stata help manual
Based on this information, I changed my code to following
Under 300th iteration, I got gradient vector (length: .0088744) with iv under the inflate part of model having value of -.0027402. (This is the largest value, not considering sign)
My question.
Can I treat gradient as zero and my results are valid or gradient values are expected to be much lower (like e-06/e-07) etc.
Thanks
I am running below model on my dataset
Code:
zinb dv control1 control2 control3 control4 iv, inflate(control3 control4 iv)
I got below information from Stata help manual
If a “not concave” message appears at the last step, there are two possibilities. One is that the result is valid, but there is collinearity in the model that the command did not otherwise catch. Stata checks for obvious collinearity among the independent variables before performing the maximization, but strange collinearities or near collinearities can sometimes arise between coefficients and ancillary parameters. The second, more likely cause for a “not concave” message at the final step is that the optimizer entered a flat region of the likelihood and prematurely declared convergence.
If a “backed up” message appears at the last step, there are also two possibilities. One is that Stata found a perfect maximum and could not step to a better point; if this is the case, all is fine, but this is a highly unlikely occurrence. The second is that the optimizer worked itself into a bad concave spot where the computed gradient and Hessian gave a bad direction for stepping.
If either of these messages appears at the last step, perform the maximization again with the gradient option. If the gradient goes to zero, the optimizer has found a maximum that may not be unique but is a maximum. From the standpoint of maximum likelihood estimation, this is a valid result. If the gradient is not zero, it is not a valid result, and you should try tightening up the convergence criterion, or try ltol(0) tol(1e-7) to see if the optimizer can work its way out of the bad region.
If you get repeated “not concave” steps with little progress being made at each step, try specifying the difficult option. Sometimes difficult works wonderfully, reducing the number of iterations and producing convergence at a good (that is, concave) point. Other times, difficult works poorly, taking much longer to converge than the default stepper.
If a “backed up” message appears at the last step, there are also two possibilities. One is that Stata found a perfect maximum and could not step to a better point; if this is the case, all is fine, but this is a highly unlikely occurrence. The second is that the optimizer worked itself into a bad concave spot where the computed gradient and Hessian gave a bad direction for stepping.
If either of these messages appears at the last step, perform the maximization again with the gradient option. If the gradient goes to zero, the optimizer has found a maximum that may not be unique but is a maximum. From the standpoint of maximum likelihood estimation, this is a valid result. If the gradient is not zero, it is not a valid result, and you should try tightening up the convergence criterion, or try ltol(0) tol(1e-7) to see if the optimizer can work its way out of the bad region.
If you get repeated “not concave” steps with little progress being made at each step, try specifying the difficult option. Sometimes difficult works wonderfully, reducing the number of iterations and producing convergence at a good (that is, concave) point. Other times, difficult works poorly, taking much longer to converge than the default stepper.
Code:
zinb dv control1 control2 control3 control4 iv, inflate(control3 control4 iv) difficult gradient
My question.
Can I treat gradient as zero and my results are valid or gradient values are expected to be much lower (like e-06/e-07) etc.
Thanks
Comment