Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ml maximize works if ml check is run first but hits a discontinuous region otherwise Poi TSP

From   "Brian P. Poi" <>
Subject   Re: st: ml maximize works if ml check is run first but hits a discontinuous region otherwise Poi TSP
Date   Fri, 06 May 2011 20:47:53 -0400

On 05/05/2011 11:58 PM, Alex Olssen wrote:
Dear Statlisters,

I am in the process of reproducing the results from Berndt and Savin's
1975 Econometrica estimation of a singular system of equations with
autoregressive errors in Stata using manual maximum likelihood.

Poi's stata help desk articles have been of invaluable assistance.

I have noticed something odd.

For my estimation of model 7 in table 1

If I run the sequence

ml model d0 ...
ml check
ml maximize

everything runs fine and the results are similar to those in Berndt and Savin.

If I run the sequence

ml model d0 ...
ml maximize

Stata hits a discontinuous region.

Any ideas what is going on here?

-ml- might be making use of random numbers in its search for initial values when checking and maximizing your likelihood function. When you run -ml check- before -ml maximize-, the first random number that -ml maximize- would therefore be different than when you call -ml maximize- without having called -ml check-.

Have you tried using -ml search- before -ml maximize-? -ml search- does a more thorough search for initial values than -ml maximize- does by itself. Also, did -ml check- issue some kind of message indicating it was going to call -ml search-?

Also, for model 8, my maximum likelihood procedure in Stata reproduces
Berndt and Savin's coefficients to only 2 decimal places - at the 3rd
decimal place there are often differences.
Standard errors are reproduced more accurately.

Does anyone have any ideas what is happening here either?  I have seen
somebody reproduce one part of Berndt and Savin in TSP and their
results were much closer - the paper was originally done in TSP.

Kind regards,


Have you tried specifying initial values? Getting different packages to produce the same estimates with difficult problems can itself be a difficult problem. You could try playing with different optimization techniques, convergence criteria, etc., though that is no guarantee. I've found that sometimes having a small dataset makes matching results even more difficult than if the dataset were larger.

One final thought: for estimating a system of nonlinear equations, even singular systems, you might try using -nlsur- instead. It's much faster on these problems. The reference manual entry for -nlsur- shows how to fit an AIDS model, and my article from 2008 in the Stata Journal (v. 8 number 4) shows how to replicate the results in my old helpdesk article using -nlsur-.

   -- Brian Poi
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index