Warning when using Gamma distribution

Open
#609 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
julia
Domain
analytics

Research direction

Start with the Gamma example in issue #94 and reproduce the warning using the provided Julia code. Read src/generalizedlinearmixedmodel.jl around line 373, then compare the behavior with lme4; done would require determining whether the warning reflects a MixedModels.jl limitation or a theoretical GLMM issue and documenting the conclusion.

Written by the indexing model from the issue text.

Description

I'd like to run GLMMs using MixedModels.jl, assuming that the response variable follows some continuous distribution. To test, I followed an example here, with the newest version 4.6.2

using RCall, MixedModels, GLM

lexdec = rcopy(R"languageR::lexdec");

lexdec.rt_raw = exp.(lexdec.RT);

f = @formula(rt_raw ~ 1 + Class*NativeLanguage + (1|Subject) + (1|Word));

lexdec_glmm_gamma = fit!(GeneralizedLinearMixedModel(f, lexdec, Gamma(), IdentityLink()), fast=true)

It shown a warning

┌ Warning: Results for families with a dispersion parameter are not reliable.
│ It is best to avoid trying to fit such models in MixedModels until
│ the authors gain a better understanding of those cases

I checked the code, and I understand that when the distribution is not one of Bernoulli, Binomial, Poisson distributions, the warning shows up.

Is it a specific issue of MixedModels.jl, or a theoretical problem of GLMMs?
Does lme4 in R have the same trouble?

Dominant language
Julia
Stars
455
Forks
51
Avg merge
3d 15h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaStats/MixedModels.jl

All issues in JuliaStats/MixedModels.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.