HTML automatically generated with rman
Table of Contents


linreg - linear regression: all six methods


void linreg(n,x,y,a,siga,b,sigb)int n;double x[n], y[n];double a[6], siga[6],
b[6], sigb[6];


linreg computes the slope (a) and intercept coefficients (b) for for OLS(Y/X) (1), OLS(X/Y) (2), OLS bisector(3) , orthogonal(4) , reduced major axis (5) and mean OLS (6) methods. The dispersions are returned in the arrays siga and sigb.

The dispersions for OLS are the general form provided by T. Isobe, E. D. Feigelson, M. G. Akritas and G. J. Babu, Ap.J. 364, 104.

mean OLS is 0.5*[OLS(X/Y) + OLS(Y/X)]


~/src/kernel/math  linreg.c


T. Isobe (fortran), P. Teuben(C)

See Also

linreg(1NEMO) , tablsqfit(1NEMO) , gaussfit(1NEMO)

Update History

xx-jul-90   Created   Isobe
13-aug-90   Ported into NEMO    PJT
28-oct-90   upgraded from Feigelstein’s official rel. 1.0    PJT

Table of Contents