added test and data set for as.factor glm2