[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: Problems in maximising a likelihood function
There may be a moral here, but that scalars
are a disaster for holding constants and
that temporary variables are better really
cannot be inferred from the story you
present. In essence, you assert that,
but present no evidence. I suspect some
other explanation for your problems, but
I do not know what it is.
> 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
> 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
> variables (if you need them) and generate them as -double-.
> And only as
> On Thu, 2006-06-15 at 21:48 +0100, Nick Cox wrote:
> > Quite so. I spoke too soon on that detail.
> > Nick
> > firstname.lastname@example.org
> > 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: