Skip to content
Prev 324932 / 398503 Next

glm.nb error

On Jun 7, 2013, at 9:44 AM, Daofeng Li <lidaof at gmail.com> wrote:

            
There is something wrong with your actual 'y' or 'group' that is not evident from the above info:


group <- c(1, 1, 1, 1, 0, 0, 0, 0)
y <- c(0, 1, 0, 0, 1, 5, 1, 0)
Loading required package: MASS
Call:  glm.nb(formula = y ~ group, init.theta = 1.711564307, link = log)

Coefficients:
(Intercept)        group  
     0.5596      -1.9459  

Degrees of Freedom: 7 Total (i.e. Null);  6 Residual
Null Deviance:	    10.23 
Residual Deviance: 6.848 	AIC: 25.25


Check str(y) and str(group)

You should also be sure to note in your posts when you are using a function from a non-base package, in this case MASS, which is not indicated in your sessionInfo() above, so something is amiss there as well.

Regards,

Marc Schwartz