[R] Fitdistr and MLE for parameter lambda of Poisson distribution
Gregor Gorjanc
gregor.gorjanc at gmail.com
Fri Feb 10 17:25:32 CET 2006
Peter Dalgaard wrote:
> Gregor Gorjanc <gregor.gorjanc at bfro.uni-lj.si> writes:
>
>
>>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
>
>
> Yes....
>
> Maximizing l(lambda) is the same as maximizing
>
> sum(x)/n ln lambda - lambda
>
> Now either take the derivative and set equal to zero, or
>
> rewrite further as equivalent to
>
> ln (lambda/(sum(x)/n)) - (lambda/(sum(x)/n))
>
> and notice that ln(x) - x has a global maximum at x=1 (since ln is
> strictly concave and the tangent at x=1 is the line y = x - 1)
>
>
> (I think this is in the first 20 pages I ever read on theoretical
> statistics ...)
Thank you very much for this. It shows, how much I still need to learn.
--
Lep pozdrav / With regards,
Gregor Gorjanc
----------------------------------------------------------------------
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si
SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europe fax: +386 (0)1 72 17 888
----------------------------------------------------------------------
"One must learn by doing the thing; for though you think you know it,
you have no certainty until you try." Sophocles ~ 450 B.C.
More information about the R-help
mailing list