Below is the output from a model of novel object test scores fit with the nbinom1 (quasi-Poisson) option in glmmADMB. I used this package/method because:

  1. the Poisson mean is < 5, so according to Bolker et al. 2009 I should not use glmmPQL
  2. there was overdipersion with the Poisson model run with glmer. The NB1 model fit with glmmADMB was the best of all fits I tried.

There are 3 fixed factors as below, as well as a SexAge interaction term, and individual (ID) is the random factor.

glmmadmb(formula = Score ~ Sex * Age + Object + (1 | ID), data = PGS, 
    family = "nbinom1")

AIC: 394.5

              Estimate Std. Error z value Pr(>|z|)
(Intercept)      0.480      0.195    2.47   0.0137
SexM             0.797      0.262    3.05   0.0023
AgeS             1.224      0.254    4.82  1.4e-06
ObjectPLA       -0.434      0.194   -2.24   0.0248
ObjectSCO       -0.822      0.203   -4.05  5.1e-05 
SexM:AgeS       -0.825      0.353   -2.33   0.0196 

Number of observations: total=105, ID=40 

Random effect variance(s):
            Variance StdDev<br/>
(Intercept)  0.03738 0.1933

Negative binomial dispersion parameter: 1.5958 (std. err.: 0.34873)

Log-likelihood: -189.228

Question: how can I test if the random effect is significant? I have looked around online, and where there are multiple random effects it seems straightforward, but I know I can't compare the GLMM to a GLM without my single random effect according to info on http://glmm.wikidot.com/faq.

I have tried Ben Bolker's varprof function in the reef-fish example:

Error in varprof(PGS.nbinom1) : <br/>
  trying to get slot "deviance" from an object (class "glmmadmb") that is not an S4 object

As well as his simulate.glm(PGS.nbinom1):

Error in simulate.glm(M1) : family nbinom not implemented

And also Jeff Evans’ way, posted on archiveorange.com, where I ran the model with an uninformative dummy variable (a column with the word "dummy" in every row) and compared that with my model with ANOVA, but also got a warning message here:

Analysis of Deviance Table

Model 1: Score ~ Sex * Age + Object<br/>
Model 2: Score ~ Sex * Age + Object<br/>
  NoPar  LogLik Df Deviance Pr(>Chi)<br/>
1     8 -189.23 <br/>                    
2     8 -189.32  0    -0.19        1<br/>

Warning message:
In anova.glmmadmb(M1, M2) :<br/>
  something's wrong: models should be nested, increasing complexity should imply increasing log-likelihood

What else can I try? Any help would be much appreciated!


Because glmmADMB (unlike lme4) can handle models without any random effects in the same framework, and thus get commensurate log-likelihood, you should be able to do this:

g1 <- glmmadmb(formula = Score ~ Sex * Age + Object + (1 | ID), 
  data = PGS, family = "nbinom1")
g2 <- glmmadmb(formula = Score ~ Sex * Age + Object, 
  data = PGS, family = "nbinom1")

(You haven't given a reproducible example so I'm not testing this.) However, even if this works it would be wise to take a look at the cautions under "how do I test whether a random effect is significant? on the GLMM FAQ (i.e., statistical/inferential issues rather than computational ones).

| cite | improve this answer | |
  • 1
    $\begingroup$ thank you so much! I ran your solution, and it seemed to "work", but I got a message saying "Estimated covariance matrix may not be positive definite" for the GLM, is this something I should be worried about? $\endgroup$ – user3749653 Jun 18 '14 at 17:00
  • 2
    $\begingroup$ if the results look sensible, proceed with caution. $\endgroup$ – Ben Bolker Jun 18 '14 at 22:52

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.