function to simulate from generalized linear mixed model (GLMM)