Monday, December 19, 2011

Poisson regression, 2011

Hi,

These are materials for Poisson regression course, 2011. This year I use R version 2.14.0 and some regression outputs are slightly different from the 2010 version where R version 2.12.0 was used. However, the different in glm() output at the 3 or later digits after the decimal point is very usual when you change R version. This is a technical issue, not a bug, of the maximum likelihood estimation method. None of the results is wrong. It means that you should not pay attention too much on later digits after the second decimal points.

If you are eager to know why the maximum likelihood estimation method is that tricky, please read some textbooks specific to this matter.

montana.dat
montana.dta
docsmoke.dat
docsmoke.dta
welsh.dat
welsh.dta

The functions for Poisson regression are within ice package.

The module can be downloaded here.

Poisson1112.pdf


You can also download ICE modules from ice and epid. However, they are not necessary for this session.

Finally, you can follow my R script file below. Don't forget to change working directory to yours.

poisson.R

No comments: