Topics in generalized linear mixed models and spatial subgroup analysis