functions for simulation from generalized linear mixed model (GLMM)