SWIG wrapper for GLM