2
$\begingroup$

This is for a study for the abundance of counted individuals of the taxon Nematocera (gnats) in dependence of the three factors "Betrieb"(two levels), "Standort" (8 levels) and "Variante" (3 levels). I have 6 replicates for each markedness. First I tried it with glm poisson.

-> glm(log(Nematocera+1) ~ Betrieb+Standort+Variante, poisson)

but there are 50+ warnings in R:

In dpois(y, mu, log = TRUE) : non-integer x = 5.613128

what does that mean? I do have count data, does the transformation change this in some way? And what can I do against this? My output isn't good anyway:

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-0.63233  -0.21529  -0.01273   0.20194   0.75027  

Coefficients: (1 not defined because of singularities)

          Estimate Std. Error z value Pr(>|z|)    
(Intercept)  1.9187905  0.1014629  18.911   <2e-16 ***
Betrieb2    -0.1125782  0.1318159  -0.854    0.393    
Standort2    0.0003384  0.1280454   0.003    0.998    
Standort3    0.0333526  0.1270018   0.263    0.793    
Standort4   -0.0434195  0.1294691  -0.335    0.737    
Standort5    0.0941010  0.1323946   0.711    0.477    
Standort6    0.0973171  0.1322933   0.736    0.462    
Standort7    0.0182000  0.1348590   0.135    0.893    
Standort8           NA         NA      NA       NA    
Variante2    0.0618031  0.0781974   0.790    0.429    
Variante3   -0.0834252  0.0811046  -1.029    0.304 

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance: 18.177  on 143  degrees of freedom
Residual deviance: 12.840  on 134  degrees of freedom
AIC: Inf

Number of Fisher Scoring iterations: 4

Means singularities, that there are not enough replicates for the three factors? And one level was completely ignored by R... and I'm shure, there are significances. But the model-critiqeu looks good.

After this i tried a linear model, where the warnings do not occur anymore, but the output is nearly the same. Besides the lm should not be used for count data. Am I right?

At least I tried the glm for the several factors:

glm(log(Nematocera+1) ~Betrieb, family = poisson)

with the same warnings, but no singularities.

I really don't know which model to use. I'm sorry for the novice approach, but I never really understood statistics. It would be very nice, if someone could help me, please.

$\endgroup$
3
  • $\begingroup$ In addition to the answer: You should use a Generalized Linear Mixed Model here. You don't explain what your factors mean, but (taking into account that "Standort" means "site") it looks like at least Standort should be modeled as a random effect. Your model is likely to be over-parameterized if you include Standort as a fixed effect. $\endgroup$ – Roland Mar 7 '16 at 9:21
  • $\begingroup$ Ok, i never used the Generalized Linear Mixed Model before. And yes, "Standort" means site, "Betrieb" could be described with region and "Variante" with land use. Thank you, i'll try the GLMM! $\endgroup$ – Angelica M. Mar 8 '16 at 15:57
  • $\begingroup$ Maybe you can tell me how this would look like in R? I will have to get the lme4 - package. And then 'glmer(Nematocera ~ Betrieb + Variante + (1|Standort), family = "poisson")'. I found no good example on this... $\endgroup$ – Angelica M. Mar 20 '16 at 16:02
1
$\begingroup$

You've taken the log of count data. That won't be count data anymore and won't be integers. Count models work on counts, not logs of counts so ...

try

glm(Nematocera ~ Betrieb+Standort+Variante, poisson)

but, in my experience, there is nearly always overdispersion so you may need a negative binomial model.

Alternatively, you can try a regular regression on the log transformed data, but I recommend against that as the transformed data will still not really be continuous.

$\endgroup$
1
  • $\begingroup$ Ok, I thought so. So do you mean, I should run the glm quasipoisson? Thank you for your help! $\endgroup$ – Angelica M. Mar 8 '16 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.