bijfit
Class DesignMatrixPoly

java.lang.Object
  |
  +--bijfit.DesignMatrix
        |
        +--bijfit.DesignMatrixPoly

public class DesignMatrixPoly
extends DesignMatrix

Design Matrix for polynomials, to be used in GeneralLeastSquares estimation. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.


Fields inherited from class bijfit.DesignMatrix
a
 
Constructor Summary
DesignMatrixPoly(double[] xs, int n)
          Create a polynomial model design matrix of the n'th order.
DesignMatrixPoly(int k, int n)
          Create a polynomial design matrix from a sequence 1..k x's.
 
Method Summary
protected  double[] fpoly(double x, int n)
          Return a double[] vector containing the basis function at x for a polynomial of order n-1.
 
Methods inherited from class bijfit.DesignMatrix
getMatrix, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DesignMatrixPoly

public DesignMatrixPoly(double[] xs,
                        int n)
Create a polynomial model design matrix of the n'th order. Will contain n basis functions evaluated at all x's
Parameters:
xs - the x values for which the basis functions are calculated.

DesignMatrixPoly

public DesignMatrixPoly(int k,
                        int n)
Create a polynomial design matrix from a sequence 1..k x's. Will contain k polynomials of the n-th order.
Method Detail

fpoly

protected double[] fpoly(double x,
                         int n)
Return a double[] vector containing the basis function at x for a polynomial of order n-1.
Parameters:
x - at which the polynomial is to be evaluated.
n - the order of the polynomial.
Returns:
a double[] vector containing the coefficients at x.