简体   繁体   English

拟泊松模型的 Akaike 准则 (AIC)

[英]Akaike criterion (AIC) for quasi-Poisson models

I run quaisi-Poisson glm models in R and I want to compute AIC criterion.我在 R 中运行 quaisi-Poisson glm 模型,我想计算 AIC 标准。 I run the code below but I am not sure if it is correct.我运行下面的代码,但我不确定它是否正确。 Also, I find wierd the fact that the AIC decreases while degrees of freedom increase.此外,我发现 AIC 降低而自由度增加的事实很奇怪。

fqaic <- function(model) {
  loglik <- sum(dpois(model$y, model$fitted.values, log = TRUE))
  phi <- summary(model)$dispersion
  qaic <- -2*loglik + 2*summary(model)$df[3]*phi
  return(qaic)
}

I would be gratefull for any advice.我将不胜感激任何建议。

There are some notes here , indicating that among other things that there are existing methods for computing qAIC in the bbmle , AICcmodavg , and MuMIn packages.还有一些注意事项这里,这表明除其他事项外,有在计算QAIC现有方法bbmleAICcmodavgMuMIn包。 The correct formula for qAIC is qAIC 的正确公式是

-2 * logLik/dispersion + 2 * df

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM