MixedModels.jl icon indicating copy to clipboard operation
MixedModels.jl copied to clipboard

Need to adjust parametricbootstrap display for GLMMs w/o scale parameter

Open dmbates opened this issue 1 year ago • 3 comments

A Bernoulli/binomial/Poisson GLMM does not have a scale parameter and parametricbootstrap produces a result in which the σ values are a vector of missing. The display or storage should be modified to take this into account.

Reproduce with

using MixedModels, TypedTables
contra = MixedModels.dataset(:contra)
contra = Table(contra, ch = contra.livch .≠ "0")
gm1 = let f = @formula use ~ 1 + age * ch + age^2 + urban + (1| dist & urban)
         fit(MixedModel, f, contra, Bernoulli(); nAGQ = 9)
       end
gm1samp = parametricbootstrap(2_000, gm1);
julia> typeof(gm1.σ)
Missing

julia> typeof(gm1samp.σ)
Vector{Missing} (alias for Array{Missing, 1})

Pretty much anything you try to do with gm1samp will throw an error.

dmbates avatar Feb 03 '24 16:02 dmbates

It might be technically breaking to not store the sigma parameter, but we can definitely improve display and handling of it.

palday avatar Feb 03 '24 17:02 palday

Agreed. Do you want me to look at it or are you willing to do so? Assign it to me if you don't have time.

dmbates avatar Feb 03 '24 17:02 dmbates

If it can wait a few days, I can do it. If you have big plans for it this week, then you should do it. :smile:

palday avatar Feb 03 '24 17:02 palday