Companion

object Companion

Types

Link copied to clipboard

The types of ranking methods for the ranks() function.

Functions

Link copied to clipboard
fun akaikeInfoCriterion(sampleSize: Int, numParameters: Int, lnMax: Double): Double

Computes the AIC based on the sample size sampleSize, the number of parameters estimated for the model numParameters, and the maximized value lnMax of the log-likelihood function of the model. Implementation based on Vose

Link copied to clipboard

Computes the Anderson-Darling test statistic. No adjustments for parameter estimation are performed.

Link copied to clipboard

Computes the lag-k auto-correlation for the supplied array lag must be greater than or equal to 0 and less than x.size. lag = 0 always returns 1.0 The array x must have 2 or more elements. If you need multiple values for different lags, then using autoCorrelations() is more efficient.

Link copied to clipboard

Computes the auto-correlations for k = 1 to and including maxLag The returned array is zero based indexed such that, ac0 is the lag-1 lag-0 is not returned because it is always 1.0

Link copied to clipboard
fun bayesianInfoCriterion(sampleSize: Int, numParameters: Int, lnMax: Double): Double

Computes the BIC based on the sample size sampleSize, the number of parameters estimated for the model numParameters, and the maximized value lnMax of the log-likelihood function of the model.

Link copied to clipboard

Computes the box plot summaries for the data within the map

Link copied to clipboard

Computes the chi-squared test statistic based on the observed counts and the expected counts. The expected counts must not contain a zero value. The size of the arrays must match.

Computes the chi-squared test statistic based on the supplied data and hypothesized distribution function, fn. The break points breakPoints are used to define the binning and tabulation of the counts for the data.

Link copied to clipboard

Computes the confidence intervals for the data in the map

Link copied to clipboard

Computes the covariance between the two arrays based on n = min(x.size, y.size) elements. There must be at least two elements in each array.

Link copied to clipboard

Assumes that the data is in each row of the matrix and that each row has the same number of elements. That is, the matrix must be rectangular.

Link copied to clipboard

Computes the Cramer-von Mises test statistic

Link copied to clipboard
fun denseRanks(data: DoubleArray, largestToSmallest: Boolean = false): DoubleArray

Returns the rank of each element in the supplied data as a separate array of ranks. If ranks is the returned array, then ranks0 indicates the rank of element 0 in the data array. In dense ranking, items that compare equally receive the same ranking number, and the next items receive the immediately following ranking number. This is called dense ranking

Link copied to clipboard

Computes the proportion of the observations that are less than or equal to the supplied value of x. If the array is empty, then 0.0 is returned.

Link copied to clipboard
fun empiricalProbabilities(n: Int, type: EmpDistType = EmpDistType.Continuity1): DoubleArray

Computes the empirical probabilities based on n order statistics using one of the three types: Base: i/n Continuity1: (i-0.5)/n Continuity2: (i-0.375)/(n + 0.25) The default type is Continuity1.

Link copied to clipboard
fun empiricalQuantiles(n: Int, quantileFunction: InverseCDFIfc, type: EmpDistType = EmpDistType.Continuity1): DoubleArray

Computes the empirical quantiles based on the empirical probabilities for a data set of size n using the supplied quantileFunction inverse CDF. The type represents the continuity type as per the empiricalProbabilities() function.

Link copied to clipboard
fun estimateProportionSampleSize(desiredHW: Double, pEst: Double = 0.5, level: Double = 0.95): Long

Estimate the sample size for a proportion based on a normal approximation

Link copied to clipboard
fun estimateSampleSize(desiredHW: Double, stdDev: Double, level: Double = 0.95): Long

Estimate the sample size based on a normal approximation

Link copied to clipboard
fun estimateSampleSizeViaStudentT(desiredHW: Double, initStdDevEst: Double, level: Double = 0.95): Long

Estimate the sample size based on iterating the half-width equation based on the Student-T distribution: hw = t(1-alpha/2, n-1)*s/sqrt(n) <= epsilon

Link copied to clipboard
fun fractionalRanks(data: DoubleArray, largestToSmallest: Boolean = false): DoubleArray

Returns the rank of each element in the supplied data as a separate array of ranks. If ranks is the returned array, then ranks0 indicates the rank of element 0 in the data array. Ties are handled by assigning the mean of the ranks that would have been given otherwise, so that the sum of the ranks is preserved. This is called fractional ranking

Link copied to clipboard
fun gTestStatistic(counts: DoubleArray, expected: DoubleArray): Double

Computes the G test statistic based on the observed counts and the expected counts. The expected counts must not contain a zero value. The size of the arrays must match.

Link copied to clipboard
fun hannanQuinnInfoCriterion(sampleSize: Int, numParameters: Int, lnMax: Double): Double

Computes the Hannan-Quinn criterion based on the sample size sampleSize, the number of parameters estimated for the model numParameters, and the maximized value lnMax of the log-likelihood function of the model. Implementation based on Vose

Link copied to clipboard

Computes the K-S test statistic for testing if the data comes from the supplied distribution.

Link copied to clipboard

Returns the median of the data. The array is sorted

Link copied to clipboard

Computes initialization bias (negative) test statistic based on algorithm on page 2580 Chapter 102 Nelson Handbook of Industrial Engineering, Quantitative Methods in Simulation

Uses the batch means array from the BatchStatistic to compute the positive bias test statistic

Link copied to clipboard
fun ordinalRanks(data: DoubleArray, largestToSmallest: Boolean = false): DoubleArray

Returns the rank of each element in the supplied data as a separate array of ranks. If ranks is the returned array, then ranks0 indicates the rank of element 0 in the data array. Each element gets a unique rank based on the sorted order of the data array. Ties are handled arbitrarily based on the underlying sorting mechanism, which seems to be predicated on the "first" ranking method for the R rank() function.

Link copied to clipboard

Gets an array of the partial sum process for the provided data Based on page 2575 Chapter 102 Nelson Handbook of Industrial Engineering, Quantitative Methods in Simulation for producing a partial sum plot The batch means array is used as the data

Gets an array of the partial sum process for the provided data Based on page 2575 Chapter 102 Nelson Handbook of Industrial Engineering, Quantitative Methods in Simulation for producing a partial sum plot

Link copied to clipboard

Computes the Pearson correlation between the elements of the array based on n = min(x.size, y.size) elements. There must be at least two elements in each array.

Link copied to clipboard

As per Apache Math commons definition

Link copied to clipboard

Computes initialization bias (positive) test statistic based on algorithm on page 2580 Chapter 102 Nelson Handbook of Industrial Engineering, Quantitative Methods in Simulation

Uses the batch means array from the BatchStatistic to compute the positive bias test statistic

Link copied to clipboard
fun quantile(unsortedData: DoubleArray, p: Double): Double

Uses definition 7, as per R definitions

Link copied to clipboard

Uses definition 7, as per R definitions

Link copied to clipboard
fun quantiles(unsortedData: DoubleArray, p: DoubleArray = doubleArrayOf(0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95)): DoubleArray

Uses definition 7, as per R definitions

Link copied to clipboard
fun quantilesFromSortedData(sortedData: DoubleArray, p: DoubleArray = doubleArrayOf(0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95)): DoubleArray

Uses definition 7, as per R definitions

Link copied to clipboard
fun ranks(data: DoubleArray, method: Statistic.Companion.Ranking = Ranking.Ordinal, largestToSmallest: Boolean = false): DoubleArray

Computes the ranks for the data array based on the supplied ranking method.

Link copied to clipboard

Computes the statistical summaries for the data within the map

Link copied to clipboard

Computes the Watson test statistic