go-lm: Linear models in Go
go-lm provides a basic implementation of weighted least squares (WLS) regression and regression with t-distributed residuals. These are implemented using the
cgo interface, with the C code directly calling standard BLAS/LAPACK functions.
For WLS regression, two methods are provided via the
Wls function. Setting
method='q' will use the QR decomposition via the DGELS LAPACK routine. Setting
method='c' (or anything else) will use the Cholesky decomposition via the DPOSV LAPACK routine.
For linear regression with t-distributed residuals, the optimal PX-EM algorithm of Meng & van Dyk (1997) is implemented via the
sudo apt-get install libatlas3gf-base libatlas-base-dev liblapack golang build-essential
The entire package is provided under the MIT license.