The ML estimate of lambda is the mean, so no need for (iterative)
optimization. See eg:
http://mathworld.wolfram.com/MaximumLikelihood.html
hth, Ingmar

On Fri, Feb 11, 2011 at 8:52 AM, Antje Niederlein <niederlein-rstat@yahoo.de
> wrote:

> Hello,
>
> I tried to fit a poisson distribution but looking at the function
> fitdistr() it does not optimize lambda but simply estimates the mean
> of the data and returns it as lambda. I'm a bit confused because I was
> expecting an optimization of this parameter to gain a good fit...
> If I would use mle() of stats4 package or mle2() of bbmle package, I
> would have to write the function by myself which should be optimized.
> But what shall I return?
>
> -sum((y_observed - y_fitted)^2)
>
> ?
>
> Any other suggestions or comments on my solution?
>
> Antje
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

