Properties

$_error

$_error : boolean

Indicator flag for a calculation error

Type

boolean

$_bestFitType

$_bestFitType : string

Algorithm type to use for best-fit (Name of this trend class)

Type

string

$_valueCount

$_valueCount : integer

Number of entries in the sets of x- and y-value arrays

Type

integer

$_xValues

$_xValues : array<mixed,float>

X-value dataseries of values

Type

array<mixed,float>

$_yValues

$_yValues : array<mixed,float>

Y-value dataseries of values

Type

array<mixed,float>

$_adjustToZero

$_adjustToZero : boolean

Flag indicating whether values should be adjusted to Y=0

Type

boolean

$_yBestFitValues

$_yBestFitValues : array<mixed,float>

Y-value series of best-fit values

Type

array<mixed,float>

$_goodnessOfFit

$_goodnessOfFit : 

Type

$_stdevOfResiduals

$_stdevOfResiduals : 

Type

$_covariance

$_covariance : 

Type

$_correlation

$_correlation : 

Type

$_SSRegression

$_SSRegression : 

Type

$_SSResiduals

$_SSResiduals : 

Type

$_DFResiduals

$_DFResiduals : 

Type

$_F

$_F : 

Type

$_slope

$_slope : 

Type

$_slopeSE

$_slopeSE : 

Type

$_intersect

$_intersect : 

Type

$_intersectSE

$_intersectSE : 

Type

$_Xoffset

$_Xoffset : 

Type

$_Yoffset

$_Yoffset : 

Type

Methods

getError()

getError() 

getBestFitType()

getBestFitType() 

getValueOfYForX()

getValueOfYForX(float  $xValue) : float

Return the Y-Value for a specified value of X

Parameters

float $xValue

X-Value

Returns

float —

Y-Value

getValueOfXForY()

getValueOfXForY(float  $yValue) : float

Return the X-Value for a specified value of Y

Parameters

float $yValue

Y-Value

Returns

float —

X-Value

getXValues()

getXValues() : array<mixed,float>

Return the original set of X-Values

Returns

array<mixed,float> —

X-Values

getEquation()

getEquation(integer  $dp) : string

Return the Equation of the best-fit line

Parameters

integer $dp

Number of places of decimal precision to display

Returns

string

getSlope()

getSlope(integer  $dp) : string

Return the Slope of the line

Parameters

integer $dp

Number of places of decimal precision to display

Returns

string

getSlopeSE()

getSlopeSE(integer  $dp) : string

Return the standard error of the Slope

Parameters

integer $dp

Number of places of decimal precision to display

Returns

string

getIntersect()

getIntersect(integer  $dp) : string

Return the Value of X where it intersects Y = 0

Parameters

integer $dp

Number of places of decimal precision to display

Returns

string

getIntersectSE()

getIntersectSE(integer  $dp) : string

Return the standard error of the Intersect

Parameters

integer $dp

Number of places of decimal precision to display

Returns

string

getGoodnessOfFit()

getGoodnessOfFit(integer  $dp) : float

Return the goodness of fit for this regression

Parameters

integer $dp

Number of places of decimal precision to return

Returns

float

getGoodnessOfFitPercent()

getGoodnessOfFitPercent(  $dp) 

Parameters

$dp

getStdevOfResiduals()

getStdevOfResiduals(integer  $dp) : float

Return the standard deviation of the residuals for this regression

Parameters

integer $dp

Number of places of decimal precision to return

Returns

float

getSSRegression()

getSSRegression(  $dp) 

Parameters

$dp

getSSResiduals()

getSSResiduals(  $dp) 

Parameters

$dp

getDFResiduals()

getDFResiduals(  $dp) 

Parameters

$dp

getF()

getF(  $dp) 

Parameters

$dp

getCovariance()

getCovariance(  $dp) 

Parameters

$dp

getCorrelation()

getCorrelation(  $dp) 

Parameters

$dp

getYBestFitValues()

getYBestFitValues() 

__construct()

__construct(array<mixed,float>  $yValues, array<mixed,float>  $xValues = array(), boolean  $const = True) 

Define the regression and calculate the goodness of fit for a set of X and Y data values

Parameters

array<mixed,float> $yValues

The set of Y-values for this regression

array<mixed,float> $xValues

The set of X-values for this regression

boolean $const

_calculateGoodnessOfFit()

_calculateGoodnessOfFit(  $sumX,   $sumY,   $sumX2,   $sumY2,   $sumXY,   $meanX,   $meanY,   $const) 

Parameters

$sumX
$sumY
$sumX2
$sumY2
$sumXY
$meanX
$meanY
$const

_leastSquareFit()

_leastSquareFit(  $yValues,   $xValues,   $const) 

Parameters

$yValues
$xValues
$const

_logarithmic_regression()

_logarithmic_regression(array<mixed,float>  $yValues, array<mixed,float>  $xValues, boolean  $const) 

Execute the regression and calculate the goodness of fit for a set of X and Y data values

Parameters

array<mixed,float> $yValues

The set of Y-values for this regression

array<mixed,float> $xValues

The set of X-values for this regression

boolean $const