HugoMVale / odrpack95

Software for Weighted Orthogonal Distance Regression with Bound Constraints
https://hugomvale.github.io/odrpack95/
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link
fortran mathematics statistics

odrpack

CI codecov Language

Description

odrpack is a package for weighted orthogonal distance regression (ODR), also known as errors-in-variables regression. It is designed primarily for instances when both the explanatory and response variables have significant errors. The package implements a highly efficient algorithm for minimizing the sum of the squares of the weighted orthogonal distances between each data point and the curve described by the model equation, subject to parameter bounds. The nonlinear model can be either explicit or implicit. Additionally, odrpack can be used to solve the ordinary least squares problem where all of the errors are attributed to the observations of the dependent variable.

Deming regression; special case of ODR.

History

The first version of the library, named ODRPACK, was originally released in 1989 [1], and the last "official" update, named ODRPACK95, dates from 2004 [2]. The full revision history is provided on page iv of the User's Reference Guide for ODRPACK95.

odrpack is a modernization of the ODRPACK95 code [3], intented to make the library easier to use and maintain. The main changes include:

Version Year Standard
odrpack 2024 Fortran 2018
ODRPACK95 1.0 2004 Fortran 95
ODRPACK 2.0 1992 FORTRAN 77
ODRPACK 1.0 1989 FORTRAN 77

References

[1] Paul T. Boggs, Janet R. Donaldson, Richaard h. Byrd, and Robert B. Schnabel. 1989. Algorithm 676: ODRPACK: software for weighted orthogonal distance regression. ACM Trans. Math. Softw. 15, 4 (Dec. 1989), 348–364. https://doi.org/10.1145/76909.76913

[2] Jason W. Zwolak, Paul T. Boggs, and Layne T. Watson. 2007. Algorithm 869: ODRPACK95: A weighted orthogonal distance regression code with bound constraints. ACM Trans. Math. Softw. 33, 4 (August 2007), 27–es. https://doi.org/10.1145/1268776.1268782

[3] Original source code from Netlib.

Build instructions

Dependencies

odrpack depends on a small number of functions from BLAS and LINPACK.

With fpm

The easiest way to build/test the code and run the examples is by means of fpm.

To build the library, do:

fpm build --profile release

To run the tests, do:

fpm test --profile release

To run the provided examples, do:

fpm run --example "example_name" --profile release

With meson

First, setup the build:

meson setup _build

To build the libraries (static and dynamic), do:

meson compile -C _build

To run the tests, do:

meson test -C _build

Licence