# 泊松回归

## 泊松回归模型

${\displaystyle \mathbf {x} \in \mathbb {R} ^{n}}$ 代表由一组相互独立的变量组成的向量，其泊松回归的模型形式为:

${\displaystyle \log(\operatorname {E} (Y\mid \mathbf {x} ))=\alpha +\mathbf {\beta } '\mathbf {x} ,}$ ${\displaystyle \alpha \in \mathbb {R} }$${\displaystyle \mathbf {\beta } \in \mathbb {R} ^{n}}$.

${\displaystyle \operatorname {E} (Y\mid \mathbf {x} )=e^{{\boldsymbol {\theta }}'\mathbf {x} }.\,}$

Yi 是被解释变量的观测值，相应的解释变量为 xi ，可由极大似然估计（Maximum Likelihood estimation）的方法来估计参数θ。 极大似然估计不能通过解析表达式获得解析解，是由其对数似然函数为凸函数的特性，可通过Newton–Raphson 或其他基于梯度下降的思想方法来进行参数估计。

## 极大似然估计

${\displaystyle \operatorname {E} (Y\mid x)=e^{\theta 'x}\,}$,

${\displaystyle p(y\mid x;\theta )={\frac {[\operatorname {E} (Y\mid x)]^{y}\times e^{-\operatorname {E} (Y\mid x)}}{y!}}={\frac {e^{y\theta 'x}e^{-e^{\theta 'x}}}{y!}}}$

${\displaystyle p(y_{1},\ldots ,y_{m}\mid x_{1},\ldots ,x_{m};\theta )=\prod _{i=1}^{m}{\frac {e^{y_{i}\theta 'x_{i}}e^{-e^{\theta 'x_{i}}}}{y_{i}!}}.}$

${\displaystyle L(\theta \mid X,Y)=\prod _{i=1}^{m}{\frac {e^{y_{i}\theta 'x_{i}}e^{-e^{\theta 'x_{i}}}}{y_{i}!}}}$.

${\displaystyle \ell (\theta \mid X,Y)=\log L(\theta \mid X,Y)=\sum _{i=1}^{m}\left(y_{i}\theta 'x_{i}-e^{\theta 'x_{i}}-\log(y_{i}!)\right)}$.

${\displaystyle \ell (\theta \mid X,Y)=\sum _{i=1}^{m}\left(y_{i}\theta 'x_{i}-e^{\theta 'x_{i}}\right)}$.

${\displaystyle {\frac {\partial \ell (\theta \mid X,Y)}{\partial \theta }}=0}$

## 泊松回归的应用

### "曝光量"（Exposure） 与 偏移量 (trade off)

${\displaystyle \log {((\operatorname {E} (Y\mid x)/({\text{exposure}}))}=\theta 'x}$

which implies

${\displaystyle \log {(\operatorname {E} (Y\mid x))}-\log {({\text{exposure}})}=\log {\left({\frac {\operatorname {E} (Y\mid x)}{\text{exposure}}}\right)}=\theta 'x}$

glm(y ~ offset(log(exposure)) + x, family=poisson(link=log) )


### 过度离势和零膨胀

${\displaystyle p(y=0\mid x;\theta )=e^{-e^{\theta 'x}}}$

## 參考文獻

1. ^ Paternoster R, Brame R. Multiple routes to delinquency? A test of developmental and general theories of crime. Criminology. 1997, 35: 45–84. doi:10.1111/j.1745-9125.1997.tb00870.x.
2. ^ Berk R, MacDonald J. Overdispersion and Poisson regression (PDF). Journal of Quantitative Criminology. 2008, 24 (3): 269–284. doi:10.1007/s10940-008-9048-4. （原始内容 (PDF)存档于2011-04-09）.