Ordinary least squares linear regression with slope, intercept and R-squared.
Part of StatLab — twenty standalone statistical analysis tools for Windows, each shipped as a native executable with no runtime dependencies. Author: S M Nazmuz Sakib · [email protected]
- Trend estimation — quantify how a KPI changes per unit of time.
- Calibration — map instrument readings to known reference values.
- Teaching regression — inspect the formulas without a statistics package.
Download linreg.exe from the Releases page, then:
Get-Content data.csv | .\linreg.exe
# or
.\linreg.exe -f data.csvThe executable is a native Windows binary — no Python, no installer, no DLLs.
go test ./...
go build -o linreg.exe .{
"slope": 2,
"intercept": 1,
"r_squared": 1
}
CSV with x,y columns. Header rows are skipped.
main_test.go covers the core algorithm with deterministic cases. Run go test ./....
MIT © S M Nazmuz Sakib (2026). Questions: [email protected].
