GoodnessOfFit Module

Types and nested modules

Type/Module Description

OLS

SumOfSquares

Three sum of squares

Functions and values

Function or value Description

calcAIC k n sse

Full Usage: calcAIC k n sse

Parameters:
    k : float
    n : float
    sse : float

Returns: float

Calculates Akaike information criterion (AIC) which is a measure of the relative quality of a regression model for a given set of data

k : float
n : float
sse : float
Returns: float

calcBIC k n sse

Full Usage: calcBIC k n sse

Parameters:
    k : float
    n : float
    sse : float

Returns: float

Calculates Bayesian information criterion (BIC) which is a measure of the relative quality of a regression model for a given set of data

k : float
n : float
sse : float
Returns: float

calculateANOVA order fitFunc xData yData

Full Usage: calculateANOVA order fitFunc xData yData

Parameters:
    order : int -
    fitFunc : float -> float -
    xData : Vector<float> -
    yData : Vector<float> -

Returns: AnovaVariationSource[]

explained = total - unexplained

order : int

fitFunc : float -> float

xData : Vector<float>

yData : Vector<float>

Returns: AnovaVariationSource[]

Example

calculateDetermination sumOfSquares

Full Usage: calculateDetermination sumOfSquares

Parameters:
Returns: float
sumOfSquares : SumOfSquares
Returns: float

calculateDeterminationAdj actual expected variables

Full Usage: calculateDeterminationAdj actual expected variables

Parameters:
    actual : seq<float> -
    expected : seq<float> -
    variables : int -

Returns: float

Gets the adjusted coefficient of determination, as known as the R-Squared (R²adj). It is adjusted by the number of used variables (not including the constant term) (https://ebrary.net/1008/economics/adjusted_coefficient_determination_adjusted)

actual : seq<float>

expected : seq<float>

variables : int

Returns: float

Example

calculateDeterminationFromValue actual expected

Full Usage: calculateDeterminationFromValue actual expected

Parameters:
    actual : seq<float>
    expected : seq<float>

Returns: float

Gets the coefficient of determination, as known as the R-Squared (R²)

actual : seq<float>
expected : seq<float>
Returns: float

calculateSSE fitFunc xData yData

Full Usage: calculateSSE fitFunc xData yData

Parameters:
    fitFunc : float -> float -
    xData : Vector<float> -
    yData : Vector<float> -

Returns: float

Calculates SSE: sum of squares of errors
also: unexplained sum of squares; residual sum of squares

fitFunc : float -> float

xData : Vector<float>

yData : Vector<float>

Returns: float

Example

calculateSSR fitFunc xData yData

Full Usage: calculateSSR fitFunc xData yData

Parameters:
    fitFunc : float -> float -
    xData : Vector<float> -
    yData : Vector<float> -

Returns: float

Calculates SSR: sum of squares regression.
also: explained sum of squares

fitFunc : float -> float

xData : Vector<float>

yData : Vector<float>

Returns: float

Example

calculateSST yData

Full Usage: calculateSST yData

Parameters:
Returns: float

Calculates SST: sum of squares total.
also: total sum of squares

yData : Vector<float>

Returns: float

Example

calculateSumOfSquares fitFunc xData yData

Full Usage: calculateSumOfSquares fitFunc xData yData

Parameters:
    fitFunc : float -> float
    xData : seq<float>
    yData : seq<float>

Returns: SumOfSquares
fitFunc : float -> float
xData : seq<float>
yData : seq<float>
Returns: SumOfSquares

createSumOfSquares ssr sse sst ssxx ssxy meanX meanY count

Full Usage: createSumOfSquares ssr sse sst ssxx ssxy meanX meanY count

Parameters:
    ssr : float
    sse : float
    sst : float
    ssxx : float
    ssxy : float
    meanX : float
    meanY : float
    count : float

Returns: SumOfSquares
ssr : float
sse : float
sst : float
ssxx : float
ssxy : float
meanX : float
meanY : float
count : float
Returns: SumOfSquares

getResiduals fitFunc xData yData

Full Usage: getResiduals fitFunc xData yData

Parameters:
    fitFunc : float -> float -
    xData : Vector<float> -
    yData : Vector<float> -

Returns: seq<float>

Calculates the residuals

fitFunc : float -> float

xData : Vector<float>

yData : Vector<float>

Returns: seq<float>

Example

standardErrorEstimate sumOfSquares

Full Usage: standardErrorEstimate sumOfSquares

Parameters:
Returns: float

Standard error if the estimate
Square root of variance s2y,x

sumOfSquares : SumOfSquares

Returns: float

Example

standardErrorIntercept sumOfSquares

Full Usage: standardErrorIntercept sumOfSquares

Parameters:
Returns: float

Standard error of intercept (alpha)

sumOfSquares : SumOfSquares

Returns: float

Example

standardErrorSlope sumOfSquares

Full Usage: standardErrorSlope sumOfSquares

Parameters:
Returns: float

Standard error of slope (beta)

sumOfSquares : SumOfSquares

Returns: float

Example

ttestIntercept intercept sumOfSquares

Full Usage: ttestIntercept intercept sumOfSquares

Parameters:
Returns: TTestStatistics
intercept : float
sumOfSquares : SumOfSquares
Returns: TTestStatistics

ttestSlope slope sumOfSquares

Full Usage: ttestSlope slope sumOfSquares

Parameters:
Returns: TTestStatistics
slope : float
sumOfSquares : SumOfSquares
Returns: TTestStatistics