Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 461 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: BestFit  - X-Ref

getError()   X-Ref
No description

getBestFitType()   X-Ref
No description

getXValues()   X-Ref
Return the original set of X-Values.

return: float[] X-Values

getSlope($dp = 0)   X-Ref
Return the Slope of the line.

param: int $dp Number of places of decimal precision to display
return: float

getSlopeSE($dp = 0)   X-Ref
Return the standard error of the Slope.

param: int $dp Number of places of decimal precision to display
return: float

getIntersect($dp = 0)   X-Ref
Return the Value of X where it intersects Y = 0.

param: int $dp Number of places of decimal precision to display
return: float

getIntersectSE($dp = 0)   X-Ref
Return the standard error of the Intersect.

param: int $dp Number of places of decimal precision to display
return: float

getGoodnessOfFit($dp = 0)   X-Ref
Return the goodness of fit for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getGoodnessOfFitPercent($dp = 0)   X-Ref
Return the goodness of fit for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getStdevOfResiduals($dp = 0)   X-Ref
Return the standard deviation of the residuals for this regression.

param: int $dp Number of places of decimal precision to return
return: float

getSSRegression($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getSSResiduals($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getDFResiduals($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getF($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getCovariance($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getCorrelation($dp = 0)   X-Ref

param: int $dp Number of places of decimal precision to return
return: float

getYBestFitValues()   X-Ref

return: float[]

calculateGoodnessOfFit($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const)   X-Ref
No description

sumSquares(array $values)   X-Ref
No description

leastSquareFit(array $yValues, array $xValues, bool $const)   X-Ref
No description

__construct($yValues, $xValues = [])   X-Ref
Define the regression.

param: float[] $yValues The set of Y-values for this regression
param: float[] $xValues The set of X-values for this regression