- library(MASS)
- x=c(rep(0,8096),
- rep(1,1629),
- rep(2,233),
- rep(3,38),
- rep(4,4)
- )
- x.bar=round(mean(x),4)
- x.var=round(var(x),4)
- p.hat=round(x.bar/x.var,4)
- alpha.hat=round(x.bar*p.hat/(1-p.hat),4)
- fitdistr(x, "Negative Binomial")
我要怎样 fit negative binomial type 2 然后做一个 goodness of fit 的 test?
谢谢


雷达卡


京公网安备 11010802022788号







