JenniNiku / gllvm

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

residual plots change without re-running the model #63

Closed PageG closed 2 years ago

PageG commented 2 years ago

Hello,

When I fit a model and then check the residual plots, each time I run the 'plot' command, the residual plots change. I've included two images showing an example of the change when running 'plot' twice on the same model. As you can see, in one plot the residuals look good, in the other they look less good. What's going on here?

gllvm_residuals_1 gllvm_residuals_2

BertvanderVeen commented 2 years ago

Thanks for your question! The residuals used in gllvm are randomized quantile residuals, which include a random component (see? residuals for some information) . As such, they will always look different from plot to plot, unless you set a seed.

PageG commented 2 years ago

OK, good to know. Many thanks.