doctest glm