# Likelihood equation for poisson GLM

I consider data {$y_{ij}$} which is a rectangular table of counts, and that follows a Poisson distribution, $y_{ij}\sim Poi(\mu_{ij})$. The mean value, $\mu_{ij}$ depends on a variable $x_{ij}$, which for each pair $(i,j)$ is known. As a model I have the following: $$\mu_{ij}=\alpha_i\beta_jx_{ij}^\gamma,$$ and I want to derive the likelihood equation system. I'm not at all sure, but wonder if the log-likelihood is given by $$\sum_i\sum_j(y_{ij}\log \mu_{ij}-\mu_{ij}).$$ I more or less got this from the fact that I know that for a Poisson distributed random variable $y_i\sim Poi(\mu_i)$, the log-likelihood is given by $$\sum_i (y_{i}\log \mu_{i}-\mu_{i}).$$ Am I way off here, or am I thinking somewhat right?

• I think you are right. May 18 '17 at 14:01

If $X \sim Pois(\theta)$ then $f(x ; \theta) = \frac{\theta^x e^{-\theta}}{x!}$ so if you have $Y_{ij}$ independent then $$\log f(\vec y ; \vec \mu) = \sum_{ij} \log f(y_{ij} ; \mu_{ij}) = \sum_{ij} (y_{ij}\log \mu_{ij} - \mu_{ij} - \log y_{ij}!).$$
If you are only interested in relative values of the log likelihood (such as when you optimize it) you can ignore the constant $-\sum_{ij} \log y_{ij}!$, but that is part of the log likelihood.
Now if we want the likelihood in terms of our model $\mu_{ij} = \alpha_i \beta_j x_{ij}^\gamma$ we can just substitute that in.