Properties

$_error

$_error : bool

Indicator flag for a calculation error

Type

bool

$_bestFitType

$_bestFitType : string

Algorithm type to use for best-fit

Type

string

$_valueCount

$_valueCount : int

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

Type

int

$_xValues

$_xValues : float[]

X-value dataseries of values

Type

float[]

$_yValues

$_yValues : float[]

Y-value dataseries of values

Type

float[]

$_adjustToZero

$_adjustToZero : bool

Flag indicating whether values should be adjusted to Y=0

Type

bool

$_yBestFitValues

$_yBestFitValues : float[]

Y-value series of best-fit values

Type

float[]

$_goodnessOfFit

$_goodnessOfFit

$_stdevOfResiduals

$_stdevOfResiduals

$_covariance

$_covariance

$_correlation

$_correlation

$_SSRegression

$_SSRegression

$_SSResiduals

$_SSResiduals

$_DFResiduals

$_DFResiduals

$_F

$_F

$_slope

$_slope

$_slopeSE

$_slopeSE

$_intersect

$_intersect

$_intersectSE

$_intersectSE

$_Xoffset

$_Xoffset

$_Yoffset

$_Yoffset

Methods

getError()

getError() : mixed

Returns

mixed —

getBestFitType()

getBestFitType() : mixed

Returns

mixed —

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() : float[]

Return the original set of X-Values

Returns

float[] —

X-Values

getEquation()

getEquation(int  $dp) : string

Return the Equation of the best-fit line

Parameters

int $dp

Number of places of decimal precision to display

Returns

string —

getSlope()

getSlope(int  $dp) : string

Return the Slope of the line

Parameters

int $dp

Number of places of decimal precision to display

Returns

string —

getSlopeSE()

getSlopeSE(int  $dp) : string

Return the standard error of the Slope

Parameters

int $dp

Number of places of decimal precision to display

Returns

string —

getIntersect()

getIntersect(int  $dp) : string

Return the Value of X where it intersects Y = 0

Parameters

int $dp

Number of places of decimal precision to display

Returns

string —

getIntersectSE()

getIntersectSE(int  $dp) : string

Return the standard error of the Intersect

Parameters

int $dp

Number of places of decimal precision to display

Returns

string —

getGoodnessOfFit()

getGoodnessOfFit(int  $dp) : float

Return the goodness of fit for this regression

Parameters

int $dp

Number of places of decimal precision to return

Returns

float —

getGoodnessOfFitPercent()

getGoodnessOfFitPercent(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getStdevOfResiduals()

getStdevOfResiduals(int  $dp) : float

Return the standard deviation of the residuals for this regression

Parameters

int $dp

Number of places of decimal precision to return

Returns

float —

getSSRegression()

getSSRegression(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getSSResiduals()

getSSResiduals(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getDFResiduals()

getDFResiduals(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getF()

getF(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getCovariance()

getCovariance(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getCorrelation()

getCorrelation(mixed  $dp) : mixed

Parameters

mixed $dp

Returns

mixed —

getYBestFitValues()

getYBestFitValues() : mixed

Returns

mixed —

__construct()

__construct(float[]  $yValues, float[]  $xValues = array(), bool  $const = True) : mixed

Define the regression

Parameters

float[] $yValues

The set of Y-values for this regression

float[] $xValues

The set of X-values for this regression

bool $const

Returns

mixed —

_calculateGoodnessOfFit()

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

Parameters

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

Returns

mixed —

_leastSquareFit()

_leastSquareFit(mixed  $yValues, mixed  $xValues, mixed  $const) : mixed

Parameters

mixed $yValues
mixed $xValues
mixed $const

Returns

mixed —