Unit LinRegression

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

LinRegression is used to perform linear regression.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EStException ancestor to all SysTools exceptions
Class EStStatError statistics exceptions
record TStLinEst full statistics for a linear regression

Functions and Procedures

procedure LinEst(const KnownY : array of Double; const KnownX : array of Double; var LF : TStLinEst; ErrorStats : Boolean);
procedure LinEst16(const KnownY; const KnownX; NData : Integer; var LF : TStLinEst; ErrorStats : Boolean);

Types

PDouble = ˆDouble;
TDoubleArray = array[0..(stMaxBlockSize div SizeOf(Double))-1] of Double;
PDoubleArray = ˆTDoubleArray;
TIntArray = array[0..(StMaxBlockSize div SizeOf(Integer))-1] of Integer;
PIntArray = ˆTIntArray;
EStExceptionClass = class of EStException;

Constants

stscStatBadCount = 170;
stscStatBadParam = 171;
stscStatBadData = 172;
stscStatNoConverge = 173;
StMaxBlockSize = MaxLongInt;

Description

Functions and Procedures

procedure LinEst(const KnownY : array of Double; const KnownX : array of Double; var LF : TStLinEst; ErrorStats : Boolean);

-Performs linear fit to data and returns coefficients and error statistics. KnownY is the dependent array of known data points. KnownX is the independent array of known data points. NData must be greater than 2. If ErrorStats is FALSE, only B0 and B1 are computed; the other fields of TStLinEst are set to 0.0. See declaration of TStLinEst for returned data.

procedure LinEst16(const KnownY; const KnownX; NData : Integer; var LF : TStLinEst; ErrorStats : Boolean);

-Performs linear fit to data and returns coefficients and error statistics. KnownY is the dependent array of known data points. KnownX is the independent array of known data points. NData must be greater than 2. If ErrorStats is FALSE, only B0 and B1 are computed; the other fields of TStLinEst are set to 0.0. See declaration of TStLinEst for returned data.

Types

PDouble = ˆDouble;

.Z+

TDoubleArray = array[0..(stMaxBlockSize div SizeOf(Double))-1] of Double;
 
PDoubleArray = ˆTDoubleArray;
 
TIntArray = array[0..(StMaxBlockSize div SizeOf(Integer))-1] of Integer;
 
PIntArray = ˆTIntArray;
 
EStExceptionClass = class of EStException;
 

Constants

stscStatBadCount = 170;

unequal or bad counts of array elements

stscStatBadParam = 171;

invalid parameter

stscStatBadData = 172;

invalid data point in array

stscStatNoConverge = 173;

no convergence in numerical routine

StMaxBlockSize = MaxLongInt;

.Z+


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:44