Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: ML numerical problems

From   Maarten buis <>
Subject   Re: st: ML numerical problems
Date   Thu, 6 May 2010 09:13:52 +0000 (GMT)

--- On Thu, 6/5/10, Valerie Orozco wrote:
> Very often in ML estimation, numerical problems occur. 

In fact numerical problems are pretty rare, they only
occasionally show up in very hard problem, in which case
you should worry about whether there is enough information
in your data present to estimate such a model in first 

> One way to deal with this in Stata, is to rescale some
> variables (with large values in comparison to others
> variables). Sometimes it enables to achieve convergence.
> But it can also remains numerical problems, partly due to
> numbers' precision.
> One researcher I work with, decided to try with Matlab. A
> ML estimation with numerical problems in Stata, converges in
> Matlab. Do you have some ideas explaining this? Are there
> some parameters or format precision to specify in Stata? I
> really want to succeed in estimating our model with Stata!

Scaling is not the only way numerical precision can occur,
badly chosen functions can do so as well, e.g. don't


instead use: 


There is a list of such tricks in William Gould (2006) "Mata
matters: precision". The Stata Journal, 6(4):550-560.

Bringing in good starting values can sometimes also help.

If that does not solve your problem you could consider coding
your ml evaluator as d2, i.e. code in analytical first and 
second derivatives of your likelihood function.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index