Skip to content

Odd ANOVA degrees of freedom with ZI component of glmmTMB model

5 messages · John Fox, Elliot Johnston, Ben Bolker

#
Dear Elliot and Ben,

Yes, something definitely seems wrong here, and as usual a reproducible 
example would help. Given that, and as soon as I have some time, I'll 
try to see what went wrong, but I won't be able to do that this week.

My apologies for the problem,
  John

John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://socialsciences.mcmaster.ca/jfox/
On 2023-01-11 1:12 p.m., Ben Bolker wrote:
#
Thanks for getting back to me Ben and John. As I was making a reproducible
example for this thread, I dropped all of the dataframe columns not used in
the analysis and ended up trimming the dataframe down from 35 columns to 6.
The zero-inflated ANOVA output now appears more sensical:
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: Count

                                 Chisq   Df  Pr(>Chisq)
Time_Period            1.9271  2    0.38154
Assignment             1.5043  1    0.22001
Time_Period:Assignment 7.9605  2    0.01868 *

The statistics for the interaction are the same as before, but the Time
Period and Assignment terms now make more sense. No observations were
dropped and the model specification remained the same, I just dropped a
number of columns. Seems strange, but I have the desired output so I don't
feel the need to troubleshoot the source of the error at this point. Hope
that's alright with you both. Thanks again for getting back to me.

-Elliot
On Wed, Jan 11, 2023 at 2:52 PM John Fox <jfox at mcmaster.ca> wrote:

            

  
  
#
It would be great if you can send along a reproducible example, 
privately if necessary.  It's always alarming to have undiagnosed 
weirdness happening, even if you can make it go away by limiting the 
problem ...
On 2023-01-11 6:08 p.m., Elliot Johnston wrote:

  
    
#
It would be great if you can send along a reproducible example, 
privately if necessary.  It's always alarming to have undiagnosed 
weirdness happening, even if you can make it go away by limiting the 
problem ...
On 2023-01-11 6:08 p.m., Elliot Johnston wrote:

  
    
#
Dear Elliot,
On 2023-01-11 6:27 p.m., Ben Bolker wrote:
Exactly!

Elliot: When you had a problem, I'm sure that you appreciated the fact 
the Ben volunteered to try to help -- even though he's not responsible 
for car::Anova().

Wouldn't you like to help future users who may step on the same bug that 
you did? Of course, that assumes that there is a bug in car:Anova() and 
not another explanation for the anomaly. In either case, it would be 
useful to know what went on.

Best,
  John