Skip to content
Linear models in Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
interfaceBLAS-LAPACK.c
interfaceBLAS-LAPACK.h
lm.go
lmT.c
lmT.h
lm_test.go
wls.c
wls.h

README.md

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 LmT function.

This package requires a current Go installation with cgo enabled and the Atlas BLAS and LAPACK libraries to compile. It has been tested on Ubuntu 12.04 with the following packages installed:

sudo apt-get install libatlas3gf-base libatlas-base-dev liblapack golang build-essential

The entire package is provided under the MIT license.

You can’t perform that action at this time.