Bookmark and Share

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


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

Re: st: Problem with ml maximize: numerical derivatives are approximate


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Problem with ml maximize: numerical derivatives are approximate
Date   Mon, 29 Nov 2010 20:56:08 +0000 (GMT)

--- On Mon, 29/11/10, Amir Fekrazad wrote:
> I wrote a program to estimate the elements of the inverse
> variance-covariance matrix (Q=inverse(V)) of a joint
> student t distribution.  <snip>
> however, it never converges and I get the following message
> with different datasets and data sizes:
> 
> numerical derivatives are approximate
> flat or discontinuous region encountered

That typically means that there is an error your program. 
Anyone who has programmed has been where you are now. The best
advise I can give you is to let it rest for a couple of days
and after that look again at with fresh eyes. 

I did not check the entire program in detail, but there are a
couple of things that struck me: Are you returning the likelihood
or the log-likelihood? Given the names you used when you replaced
`lnf' it looks like the likelihood, while -ml- expects the 
log-likelihood. The other thing I noticed is that you used Stata's
matrix commands. That is not a good idea. Either go for Mata when
you want to think in terms of matrices or use Stata when you 
prefer to think in terms of variables.

Hope this helps,
Maarten

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

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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