[R] Singularities in glm()
voodooochild at gmx.de
voodooochild at gmx.de
Wed Apr 19 11:17:25 CEST 2006
Hello,
i have the following model,
poi1<-glm(F~S+T+L+C,family=poisson,x=T)
where F,S,T,L are metric and C is a factor variable with the levels "0",
"1", "2", "3", "4", "5" and "6"
if i do summary(poi1), i get the following
Call:
glm(formula = F ~ S + T + L + C, family = poisson, x = T)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.44054 -0.80997 -0.04627 0.69402 2.90301
Coefficients: (1 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
(Intercept) -10.45553 1.16221 -8.996 < 2e-16 ***
S 1.08024 0.13609 7.938 2.06e-15 ***
T 1.63582 0.05170 31.643 < 2e-16 ***
L 3.31684 0.49965 6.638 3.17e-11 ***
C1 0.21256 0.16449 1.292 0.1963
C2 -0.10895 0.06675 -1.632 0.1027
C3 0.15159 0.06992 2.168 0.0302 *
C4 0.50949 0.05870 8.680 < 2e-16 ***
C5 0.11240 0.01686 6.667 2.61e-11 ***
C6 NA NA NA NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 47365.29 on 495 degrees of freedom
Residual deviance: 574.64 on 487 degrees of freedom
AIC: 4091.8
Number of Fisher Scoring iterations: 4
my question now is why do i get those "singularities" and where do they
come from, i guess because of the singularites i get the NA's, what can
i do here to avoid them?
I think i have done some wrong dummy coding or something like that? By
the way, i have 7 levels and only got estimates for 6 levels, whats
wrong here?
best regards
andreas
More information about the R-help
mailing list