# [HOMEWORK-USING R] Poisson Model using likelihood

#### rantree

##### New Member
Question :A well-known example involving the Poisson model was described by LJ Bortkiewickz (1868-1931). The data refer to the annual number of deaths by horse kicks in battalions of army soldiers. Fourteen battalions were examined over number of years, resulting in a total of 200 battalions-years.

Number of deaths: (k) 0 1 2 3 4 ≥ 5
_________________________________________________
Number of battalions-years (nk): 109 65 22 3 1 0

Set a simple Poisson model and assess the quality of fit of the model. (To evaluate the quality of fit of the model you can use a chi-square test, comparing the observed values ​​and the fitted values​​).

----------------------------------------------------
Can someone help me with this ?

Last edited:

#### Dason

Do you know how to estimate the parameter in the poisson model?

#### rantree

##### New Member
Well I did this:
Code:
theta <-seq(.3,1.3,len=100)
k<- c(0,1,2,3,4)
nk<- c(109,65,22,3,1)
ll<- -theta*sum(nk) + log(theta)* sum(k*nk)
like<- exp(ll-max(ll))

plot(theta,like,xlab=expression(theta),
ylab='Likelihood',type='l')
but how can i assess the quality ?

#### GretaGarbo

##### Human
Well I did this:
Code:
theta <-seq(.3,1.3,len=100)
k<- c(0,1,2,3,4)
nk<- c(109,65,22,3,1)
ll<- -theta*sum(nk) + log(theta)* sum(k*nk)
like<- exp(ll-max(ll))

plot(theta,like,xlab=expression(theta),
ylab='Likelihood',type='l')
but how can i assess the quality ?
What is your estimate of the Poisson parameter?