Subject: ugly weird expression to be passed to R??
From: dlakelan
Date: Thu, 31 Jul 2008 14:46:15 -0700
Robert Dodier wrote:
> On Thu, Jul 31, 2008 at 12:28 PM, dlakelan <dlakelan at street-artists.org> wrote:
>
>> I did try using lbfgs to get the maximum likelihood estimates, and it
>> did work, even with 800+ data points in the likelihood expression.
>
> I'm glad to hear it worked, but I'm a little confused. Do you mean
> the log likelihood is a literal sum of 800 terms? I think it should be
> possible to avoid that, and if it's not, I'll fix it so it is.
I have 800+ data points, so I calculated the probability density
expression "p" from my expression for the cumulative distribution
function, created a function that calculates -log(p) and then created a
sum of 800+ terms from the data points and handed that massive
expression to LBFGS. It takes several seconds to calculate the
expression, and god help you if you forget the $ at the end and it
prints the damn thing, but I didn't see an easier way because I thought
LBFGS would want to take derivatives of the expression for its
minimization??
How would you have done it?
Also, I'd be happy to see your paper on Bayesian methods in maxima!