an extended demo on model fitting/comparison by data subgroups in R