[R] logLik for poisson models

Antonio.Gasparrini at lshtm.ac.uk Antonio.Gasparrini at lshtm.ac.uk
Mon Feb 2 02:47:50 CET 2009


Dear all,
 
I have a very basic question:
how does the logLik function work for poisson models?
 
Example:
I simulate 20 observations from a Poisson distribution with mean 800.
 
y <- rpois(20,800)
model <- glm(y ~ 1, family=poisson())
logLik(model)

I would like to know what's the exact formula the function logLik uses.
I looked at ?extractAIC but I cannot sort it out.
 
Can you please give me an help?
Thanks a lot

Antonio Gasparrini
Public and Environmental Health Research Unit (PEHRU)
London School of Hygiene & Tropical Medicine
Keppel Street, London WC1E 7HT, UK
Office: 0044 (0)20 79272406 - Mobile: 0044 (0)79 64925523
Skype contact: a.gasparrini
http://www.lshtm.ac.uk/people/gasparrini.antonio ( http://www.lshtm.ac.uk/pehru/ )




More information about the R-help mailing list