script to write glm model for adnet