JenniNiku / gllvm

Generalized Linear Latent Variable Models
https://jenniniku.github.io/gllvm/
48 stars 19 forks source link

randomCoefplot #171

Closed AlainZuur closed 3 months ago

AlainZuur commented 3 months ago

Sorry to keep you busy on a Saturday.

This is from the help file of randomCoefplot.gllvm. If I run this code, then it crashes R. From a fresh restart. Multiple times. I don't think it did that for the CRAN version.

The reason that I ran the demo code is that randomCoefplot didn't want to give me SEs anymore. CRAN did.

Alain

library(gllvm)

data(antTraits) y <- as.matrix(antTraits$abund) X <- as.matrix(antTraits$env) TR <- antTraits$traits

Fit model with random slopes

fitF <- gllvm(y = y, X = X, TR = TR, formula = ~ Bare.ground + Bare.ground : Webers.length, family = poisson(), randomX = ~ Bare.ground) randomCoefplot(fitF)

BertvanderVeen commented 3 months ago

Ok, I will take a look.

BertvanderVeen commented 3 months ago

Oof, that took me a while. Found the bug, fixed it.

BertvanderVeen commented 3 months ago

@AlainZuur can you confirm that this is solved?