There is no reason to have them as separate functions. User should simply be able to call matrix_glm and specify the type of model they want.