# The AIC for my Poisson Regression is INF. Does it mean i shouldn't use Poisson regression for my model?

I am trying to create a regression model for this variable (Y) based on 2 categorical variables. So, I created dummy variables to replace them. These dummy variables (i.e. int_collab, Q1,Q2,Q3) have values of 1 and 0.

Y is a double, with values ranging from 0 to 348.19, and about 10% of it has values of 0. It follows Poisson distribution.

But, when I model it:

glm(Y ~ int_collab + Q1 + Q2 + Q3, data = capdata,
family=poisson(link="log"))


It returned INF for the AIC value. I am guessing something is wrong? Is it because i am not supposed to use Poisson to model this variable?

I have been reading online, but it confused me even further. It seems i should consider using either Negative Binomial or Quasi Poisson (as the variance greater than mean), etc ... Any pointer on which distribution would be more suitable would be much appreciated!

## migrated from stackoverflow.comJun 27 at 7:51

This question came from our site for professional and enthusiast programmers.

• Y is an indicator called FWCI. It is calculated by taking the ratio between a publication citations with the average number of citations received by all other similar publications. I am trying to see if any of the predictors (journal quality ~ quartile 1 to quartile 4 and international collaboration) has any affect on this FWCI. – I_Tan Jun 27 at 8:23

## 1 Answer

I think you have a dummy variable problem or singularities. As your variables are dummies you can not use all in the regression, otherwise there is a problem of identification. See the summary of the results, one of the Qi coefficients would be NA. Also the warnings said that the function does not produce integer values.

One solution is to retire one of the Qi dummies, the one you want as a base of comparison (the glm function actually omits one) and use another link function. I tried quasipoisson (see here a discussion on it) and get the results. But of course, it depends on your data.

Here I generated same data and I was able to replicate the same AIC = Inf problem.

FWCI <- c(c(18,17,15,20,10,20,25,13,12)/1.2,c(18,17,15,20,10,20,25,13,12)/0.8)
#int_collab, Q1,Q2,Q3
no=length(FWCI)
int_collab=rep(c(0,1),length.out=no)
Qs <- gl(3,1,no,labels=c("Q1","Q2","Q3")) #factor

glmp <- glm(FWCI ~ int_collab + I(Qs=="Q1")+I(Qs=="Q2")+I(Qs=="Q3"), family = poisson(link="log"))
glmp

#Call:  glm(formula = FWCI ~ int_collab + I(Qs == "Q1") + I(Qs == "Q2") +
#    I(Qs == "Q3"), family = poisson(link = "log"))
#
#Coefficients:
#      (Intercept)         int_collab  I(Qs == "Q1")TRUE  I(Qs == "Q2")TRUE  I(Qs == "Q3")TRUE
#          2.77893            0.02667            0.29299           -0.16127                 NA
#
#Degrees of Freedom: 17 Total (i.e. Null);  14 Residual
#Null Deviance:     34.63
#Residual Deviance: 23.21   AIC: Inf

#summary(glmp)

glmr <- glm(FWCI ~ int_collab + Qs, family = quasipoisson())

glmr

#Call:  glm(formula = FWCI ~ int_collab + Qs, family = quasipoisson())
#
#Coefficients:
#(Intercept)   int_collab         QsQ2         QsQ3
#    3.07192      0.02667     -0.45426     -0.29299
#
#Degrees of Freedom: 17 Total (i.e. Null);  14 Residual
#Null Deviance:     34.63
#Residual Deviance: 23.21   AIC: NA

#anova(glmr, test = "F")
#summary(glmr)