[R] Poisson Maximum Likelihood Estimation

Paul Sweeting mail at paulsweeting.co.uk
Mon Jan 28 16:27:48 CET 2008


Many thanks for your suggestions on the forum (and to those that have
emailed me directly) - I'll make a start on the poisson mle approach
shortly!

Paul

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Gavin Simpson
Sent: 25 January 2008 15:14
To: David Winsemius
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Poisson Maximum Likelihood Estimation

>hits=-2.6 tests=BAYES_00
>X-USF-Spam-Flag: NO

>On Fri, 2008-01-25 at 14:21 +0000, David Winsemius wrote:
>> "Paul Sweeting" <mail at paulsweeting.co.uk> wrote in
>> news:000101c85f4e$c3d25b50$4b7711f0$@co.uk: 
><snip />
>> The most straightforward approach would be to use glm() with 
>> family="poisson", a.k.a Poisson regression.  Don't ask me why 
>> Gamma is capitalized as an R family but poisson is not, I don't know. 

>That is because there already is a gamma() for the *Gamma function*.

>>From ?glm:

>  family: a description of the error distribution and link function to
>          be used in the model. This can be a character string naming a
>          family function, a family function or the result of a call to
>          a family function.  (See 'family' for details of family
>          functions.)

>So the character string must match the *name* of the correct family
>function, hence you need to use "Gamma" even though you are not calling
>the function directly. This isn't a string to simply say which family
>you want, it has a slightly deeper meaning, hence the presumed
>inconsistency.

>I guess gamma() existed before the Gamma family function was included in
>R or S, hence it got the lowercase name "gamma".

>G

><snip />
>-- 
>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
> Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
> ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
> Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
> Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
> UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
>%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help at 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.



More information about the R-help mailing list