datan

## Class Regression

- java.lang.Object
- - datan.Regression

-     public class Regression
      extends java.lang.Object

  A class performing polynomial regression.
  Author:
    Siegmund Brandt.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Regression(double[] t, double[] y, double[] deltay, int nr)` Polynomial regression with known errors.
    `Regression(double[] t, double[] y, int nr)` Polynomial regression with unknown errors, assumed all equal.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `confidenceLimit(double tt, double p)`
    `DatanVector` | `getChiSquare()`
    `DatanVector` | `getParameters()`
    `double` | `regressionLine(double tt)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Regression

          public Regression(double[] t,
                    double[] y,
                    double[] deltay,
                    int nr)

      Polynomial regression with known errors.
      Parameters:
        `t` - values of the controlled variable
        `y` - measurements
        `deltay` - measurement errors
        `nr` - number of parameters in the polynomial

    - #### Regression

          public Regression(double[] t,
                    double[] y,
                    int nr)

      Polynomial regression with unknown errors, assumed all equal.
      Parameters:
        `t` - values of the controlled variable
        `y` - measurements
        `nr` - number of parameters in the polynomial

  - ### Method Detail

    - #### getChiSquare

          public DatanVector getChiSquare()

      Returns:
        vector of nr chisquare values

    - #### getParameters

          public DatanVector getParameters()

      Returns:
        vector of nr parameters

    - #### regressionLine

          public double regressionLine(double tt)

      Returns:
        ordinate value eta on regression line for abscissa value tt of controlled variable

    - #### confidenceLimit

          public double confidenceLimit(double tt,
                               double p)

      Returns:
        confidence limit for a given value tt of the controlled variable and a given probability p