WebCab Probability and Statistics for Delphi (.NET) v3.6

FactorModel.AddTabulatedFunction Method 

Adds a basis function which is constructed from a set of tabulation points which are then interpolated using cubic spline interpolation in order to construct the basis function.

public void AddTabulatedFunction(
   double[] tabulationPointsX,
   double[] tabulationPointsY
);

Parameters

tabulationPointsX
An array where the k-th term corresponds to the x-coordinate of the k-th pair within the set of tabulation points.
tabulationPointsY
An array where the k-th term corresponds to the y-coordinate of the k-th pair within the set of tabulation points.

Remarks

For general details concerning how this method is used within the factor model please see GeneralLinearFactorModel documentation.

Using a Tabulated Function

A tabulated function is a function which is only known at a set of discrete points. Since here we deal with basis functions of one real variable these discrete points will be given by coordinate pairs: (xi, yi), i = 1, 2,...; where yi = f(xi), with f being the basis function. For the k-th tabulation point the x-coordinate value is given by the k-th term of the array parameter tabulationPointsX, and the y-coordinate value is given by the k-th term of the array parameter tabulationPointsY. Then in order to construct the basis functions over the entire range we use cubic spline interpolation as provided by Interpolation.cubicSplinePointwise

Please note that when we apply cubic spline interpolation we assume that the gradient at the first (First Gradient) and last (Last Gradient) tabulation points is given by:

First Gradient = (tabulationPointsY[1] - tabulationPointsY[0]) / (tabulationPointsX[1] - tabulationPointsX[0])

Last Gradient = (tabY[last] - tabY[secondToLast]) / (tabX[last] - tabX[secondToLast])

where:

  1. tabY[last] = tabulationPointsY[tabulationPointsY.length-1], i.e. the y-coordinate of the last tabulation point.
  2. tabY[secondToLast] = tabulationPointsY[tabulationPointsY.length-2], i.e. the y-coordinate of the second to last tabulation point.
  3. tabX[last] = tabulationPointsX[tabulationPointsX.length-1], i.e. the x-coordinate of the last tabulation point.
  4. tabX[secondToLast] = tabulationPointsX[tabulationPointsX.length-2], i.e. the x-coordinate of the second to last tabulation point.

Using Alternative Interpolation Procedures

If you require more flexibility of the type of use of the interpolation procedure from which the basis function is constructed. Then you will need to use the functions basis interface FunctionBasis in combination with the wide range of interpolation procedures which are available within the class Interpolation. In order to see exactly how this is done we direct you to the documentation of the class FunctionBasis and the clients examples which are provided within this product.

See Also

FactorModel Class | WebCab.Libraries.Statistics.CurveFitting Namespace