过度离散的插图

时间:2018-05-27 14:18:56

标签: r glm poisson

我试图在直方图上绘制最佳拟合泊松分布,以显示数据中的过度分散。我遇到了一段代码:第一部分创建直方图并计算泊松模型。到现在为止还挺好。

hist(patents$ncit, nclas=14,col="light blue",prob=T,
     xlab="Number of citations",ylab="",main="",
     cex.lab=1.5,cex.axis=1.3)

glm(formula = ncit ~ 1, family = poisson, data = patents)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.7513  -1.7513  -0.4604   0.3596   6.4405  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  0.42761    0.01164   36.72   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 13359  on 4808  degrees of freedom
Residual deviance: 13359  on 4808  degrees of freedom
AIC: 20350

Number of Fisher Scoring iterations: 6

在代码的第二部分中,构造了最佳拟合泊松线。我不明白 exp(0.32723))来自哪里?

lines(0:14,dpois(0:14,exp(0.32723)),col="red",lwd=2)

0 个答案:

没有答案