胡良平编写的SAS统计分析教程16章,Poisson回归分析,P269有详细的例子,程序,步骤及解释。
data xx;
input year c n@@;
cards;
2000 0 201.1
2001 1 193.3
2002 1 181.4
2003 1 171.0
2004 3 163.1
2005 3 158.0
2006 4 159.6
2007 4 164.2
2008 8 158.0
2009 9 163.2
2010 12 198.3
;
title1 'Poisson模型中过离散 Lagrange 检验';
proc genmod data=wxq ;
model c/n=year/link=log dist=nb noscale ;
run;
title2 'Poisson模型中过离散 如数据不独立,或模型中重要的解释变量没有考虑,或数据有异常值存在等';
title3 'Poisson模型中过离散调整方法 Scale=Deviance 或者 Scale=Pearson';
title4 'Poisson模型拟合优度检验,Deviance 对应P大于0.05,表明调整了过离散后模型拟合良好';
proc genmod data=xx;
model c/n=year/link=log dist=poisson lrci obstats residuals type1 type3 scale=deviance;
run;