regression
Class Regress

java.lang.Object
  |
  +--regression.Regress

public class Regress
extends java.lang.Object

This class performs simple regressions (y = a + b*x).


Field Summary
 double a
           
 double b
           
 int n
           
 double[] pred
           
 double[] resid
           
 double[] sorted_resid
           
 double[] x
           
 
Constructor Summary
Regress()
           
 
Method Summary
 void fit(double[] u, double[] v, int n, Regress results)
           This method performs a simple linear regression (y = a + b*x).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public double[] x

n

public int n

a

public double a

b

public double b

pred

public double[] pred

resid

public double[] resid

sorted_resid

public double[] sorted_resid
Constructor Detail

Regress

public Regress()
Method Detail

fit

public void fit(double[] u,
                double[] v,
                int n,
                Regress results)

This method performs a simple linear regression (y = a + b*x).

Parameters:
n - The number of data points
results - A Regress "structure" that includes the x and y vectors, n, the estimated parameters, residuals, predicted y's, ...