Re: [R] Fitdistr and MLE for parameter lambda of Poisson distribution

From: Bernardo Rangel tura <tura_at_centroin.com.br>
Date: Tue 14 Feb 2006 - 20:30:10 EST

At 09:35 AM 2/10/2006, Gregor Gorjanc wrote:
>Hello!
>
>I would like to get MLE for parameter lambda of Poisson distribution. I
>can use fitdistr() for this. After looking a bit into the code of this
>function I can see that value for lambda and its standard error is
>estimated via
>
>estimate <- mean(x)
>sds <- sqrt(estimate/n)
>
>Is this MLE? With my poor math/stat knowledge I thought that MLE for
>Poisson parameter is (in mixture of LaTeX code)
>
>l(\lambda|x) \propto \sum^n_{i=1}(-\lambda + x_iln(\lambda)).
>
>Is this really equal to (\sum^n_{i=1} x_i) / n
>
>--
>Lep pozdrav / With regards,
> Gregor Gorjanc

Gregor,

If I understood your LaTeX You is rigth.

If you donīt know have a command wich make this for you: fitdistr()

Look:

 > d<- rpois(50,5)
 > d
  [1] 6 4 6 4 5 5 4 11 7 5 7 3 5 10 4 9 4 2 4 5 4 4 9 3 10
[26] 4 3 9 6 7 5 4 2 7 3 6 7 8 6 6 3 3 3 2 5 4 3 8 5 7  > library(MASS)
 > fitdistr(d,"Poisson")

     lambda
   5.3200000
  (0.3261901)

[]s
Tura



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 14 19:39:13 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:29 EST