fitting quasi family using glmulti?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 15:36:09

glmulti does allow for quasi-families in the error distribution.

In your case, you should simply call glmulti with the additional argument family=quasipoisson (it will be passed to the fitting function glm).

Note that for this type of model you are using quasi-likelihoods, so that AIC or BIC are not recommended. You should use the quasi-equivalent of the latter (QAIC or QBIC). This is achieved by setting the argument crit to "qaic" (for instance). You will have to provide an estimate for the overdispersion factor, usually from the saturated model (see the documentation for more; or ask the package author for assistance).

Otherwise, there is no specific counter-indication to the use of multimodel comparison with this type of models.

Best

Problem with the other answer that was suggested is that "qaic" doesn't seem to work in glmulti. For me this worked though:

library(bbmle)
qaicmod = function (fit) qAIC(fit, dispersion=with(fit,sum((weights * residuals^2)[weights > 0])/df.residual) ) 

glmulti.out <- glmulti(XXX model formula XXX, 
  data = mydata,crit = "qaicmod", 
   confsetsize = 5, fitfunction = "glm", 
   family = poisson)

This uses a regular poisson GLM but calculates the QAIC based on the estimated dispersion coefficient. In the dispersion argument of the qaicmod function you could also put the estimated dispersion coefficient of a full quasipoisson GLM with all variables included (some statisticions I have seen recommend this), i.e. to use instead

disp <<- summary(fullmodel)$dispersion
qaicmod = function (fit) qAIC(fit, dispersion=disp) 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!