Nick,
There is a world of difference between scalars and temporary variables
(generated as -double-) at least in the context of -ml- estimation. As I
discovered the hard way, after several days of labour.
When I had first written the program there were several mistakes. I
corrected them over many iterations, with help and advice from
statlisters. But, I also changed my temporary variables to scalars, and
that was a disaster.
Because, when I had corrected everything else in the program, I was
still not getting convergence because of scalars. I had tried everything
and was almost on the verge of giving up; then it struck me as a passing
thought that maybe I should just try using temporary variables once
again. I did so and presto! There was convergence!
Moral of the story: never use scalars in -ml- estimation; use temporary
variables (if you need them) and generate them as -double-. And only as
-double-.
Deepankar
On Thu, 2006-06-15 at 21:48 +0100, Nick Cox wrote:
> Quite so. I spoke too soon on that detail.
>
> Nick
> [email protected]
>
> Deepankar Basu
>
> > But I cannot clean up the expression for the log likelihood
> > any further.
> > As I had said earlier, the log likelihood for each
> > observation is of the
> > following form: ln(a+b); where 'a' and 'b' are huge expressions
> > involving exponentials, etc. I don't see how I can simplify it any
> > further;
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/