Convert NIH math code to glm.