[R-sig-ME] degrees of freedom in Gamma GLMMs

Ben Bolker bbolker at gmail.com
Mon Feb 19 13:37:16 CET 2018


I wonder if the editor is asking for *denominator* degrees of freedom.

This is a tough one; if it were not a crossed-random-effects model you
could use classic parameter/level-counting approaches as in lme.
I believe SAS has Kenward-Roger implemented for GLMMs, but the only
published justification I know for this (K-R was derived for LMMs, not
GLMMs)
is a suggestion in Stroup's book that it seems to work reasonably well.

You (1) could ask the editor how they actually suggest you do this,
(2) report just the numerator/model-difference df and see if you get
away with it, (3) report the
*minimum* df (minimum number of groups involved in estimation of an effect)

https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#why-doesnt-lme4-display-denominator-degrees-of-freedomp-values-what-other-options-do-i-have


On Mon, Feb 19, 2018 at 5:27 AM, Henrik Singmann
<singmann at psychologie.uzh.ch> wrote:
> Hi Jana,
>
> If you want degrees of freedom, you could use package afex which allows you
> to calculate likelihood-ratio tests for the fixed effects. This way you can
> simply report chi-square tests with df equal to the number of omitted
> parameters for each test. For example:
>
> library("afex")
> data("fhch2010") # load Freeman, Heathcote, Chalmers, and Hockley (2010)
> data
> fhch <- droplevels(fhch2010[ fhch2010$correct,]) # remove errors
>
> m1s <- mixed(rt ~ task*stimulus + (stimulus|id) + (task|item),
>              fhch, method = "LRT", family = Gamma(link = "identity"))
> m1s
> # Mixed Model Anova Table (Type 3 tests, LRT-method)
> #
> # Model: rt ~ task * stimulus + (stimulus | id) + (task | item)
> # Data: fhch
> # Df full model: 11
> #          Effect df     Chisq p.value
> # 1          task  1 14.43 ***   .0001
> # 2      stimulus  1 28.37 ***  <.0001
> # 3 task:stimulus  1 12.11 ***   .0005
> # ---
> # Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
> (For simplicity I have omitted convergence warnings from the output.)
>
> Note that the values of the test statistics reported can be different from
> the ones reported by glmer directly, because they are based on comparing a
> full model against a reduced model in which each effect is omitted. However,
> models are also estimated with lme4::glmer.
>
> I would report the main effect of task as: chi^2(1) = 14.43, p = .0001
> (replace chi with the greek symbol and ^2 with power of two).
>
> Hope that helps,
> Henrik
>
>
>
> Am 19.02.2018 um 10:25 schrieb Klaus, J. (Jana):
>>
>> Hi all,
>>
>>
>> I have fitted a GLMM with a Gamma distribution with crossed random effects
>> in lme4 for reaction times, like this:
>>
>>
>> model = glmer(RT~Factor1*Factor2+ (1+Factor1+Factor2|subj) +
>> (1+Factor1|item), data=xdat, family = Gamma(link = "identity"),
>> control=glmerControl(optimizer = "bobyqa"))
>>
>>
>> The editor now insists on reporting degrees of freedom. From what I have
>> found online, this is not trivial, and potentially not at all possible with
>> the design. I fit the same model with glmmPQL but I cannot reproduce the
>> results, presumably because the random effects are treated as nested rather
>> than crossed there. Also, as far as I can tell, all other workarounds to
>> compute dfs do not apply to this specific design. Nevertheless, I’m afraid I
>> might be overlooking something essential already implemented in lme4 (or any
>> other package for that matter). If this is not the case, could you point me
>> towards any work that explains *why* it can’t be done for GLMMs? Any help is
>> greatly appreciated!
>>
>>
>> Cheers,
>>
>> Jana
>>
>>
>>         [[alternative HTML version deleted]]
>>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list